apply-clients 3.4.84 → 3.4.85
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 +0 -1
- package/package.json +1 -1
- package/src/filiale/hongda/android/AppAddMaterialScience.vue +393 -0
- package/src/filiale/hongda/android/AppExplorationUser.vue +507 -0
- package/src/filiale/hongda/android.js +7 -0
- package/src/filiale/hongda/pc/ExplorationSelect.vue +485 -0
- package/src/filiale/hongda/pc/ServiceControl.vue +1930 -0
- package/src/filiale/hongda/pc/ServiceView.vue +533 -448
- package/src/filiale/hongda/pc/addMaterialScience.vue +536 -0
- package/src/filiale/hongda/pc/chargeManagement.vue +691 -0
- package/src/filiale/hongda/pc/printChargepc.vue +135 -0
- package/src/filiale/hongda/pc/printactivatecard.vue +140 -0
- package/src/filiale/hongda/pc/printinstall.vue +105 -0
- package/src/filiale/hongda/pc.js +7 -0
- package/src/filiale/shexian/android/AppExplorationUser.vue +129 -130
- package/src/filiale/shexian/android/AppServiceView.vue +1 -1
- package/src/filiale/shexian/pc/ServiceControl.vue +1955 -1944
- package/src/filiale/shexian/pc/ServiceView.vue +1020 -1020
|
@@ -0,0 +1,536 @@
|
|
|
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
|
+
|
|
14
|
+
<th class="textNoLineBreak">
|
|
15
|
+
<button v-if="$parent.$parent.mark === 0" class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加</button>
|
|
16
|
+
<button v-if="$parent.$parent.mark === 0 && $parent.$parent.selectdata.defname === '营业厅缴费' " class="button_new button_spacing" type="button" @click="$parent.$parent.chargeMaterial()">收费</button>
|
|
17
|
+
<!-- <button type="button" class="btn btn-info head-but" v-if="$parent.$parent.mark === 0"
|
|
18
|
+
@click="$parent.$parent.showFile = !$parent.$parent.showFile">导入</button>
|
|
19
|
+
<a type="button" class="btn btn-info head-but" v-if="$parent.$parent.mark === 0"
|
|
20
|
+
href="/apply/download/excel/材料明细.xlsx" download>模板下载</a>-->
|
|
21
|
+
</th>
|
|
22
|
+
</tr>
|
|
23
|
+
</template>
|
|
24
|
+
<template partial='body'>
|
|
25
|
+
<tr>
|
|
26
|
+
<td style="text-align: center;">
|
|
27
|
+
<nobr>{{$index+1}}</nobr>
|
|
28
|
+
</td>
|
|
29
|
+
<td style="text-align: center;">
|
|
30
|
+
<nobr>{{row.f_material_name}}</nobr>
|
|
31
|
+
</td>
|
|
32
|
+
<td style="text-align: center;">
|
|
33
|
+
<nobr>{{row.f_material_style}}</nobr>
|
|
34
|
+
</td>
|
|
35
|
+
<td style="text-align: center;">
|
|
36
|
+
<nobr>{{row.f_material_unit}}</nobr>
|
|
37
|
+
</td>
|
|
38
|
+
<td style="text-align: center;">
|
|
39
|
+
<nobr>{{row.f_material_number}}</nobr>
|
|
40
|
+
</td>
|
|
41
|
+
<td style="text-align: center;">
|
|
42
|
+
<nobr>{{row.f_material_price}}</nobr>
|
|
43
|
+
</td>
|
|
44
|
+
<td style="text-align: center;">
|
|
45
|
+
<nobr>{{row.f_material_type}}</nobr>
|
|
46
|
+
</td>
|
|
47
|
+
<td style="text-align: center;">
|
|
48
|
+
<button type="button" class="button_search button_spacing" @click="$parent.$parent.updateMaterial($index,row)">修改</button>
|
|
49
|
+
<button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除</button>
|
|
50
|
+
</td>
|
|
51
|
+
</tr>
|
|
52
|
+
</template>
|
|
53
|
+
</data-grid>
|
|
54
|
+
<span>合计:{{pricesum}}</span>
|
|
55
|
+
<!-- <modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
|
|
56
|
+
<header slot="modal-header" class="modal-header">
|
|
57
|
+
<button type="button" class="close" @click="closeFile"><span>×</span></button>
|
|
58
|
+
<h4 class="modal-title">选择文件</h4>
|
|
59
|
+
</header>
|
|
60
|
+
<article slot="modal-body" class="modal-body">
|
|
61
|
+
<div class="form-group">
|
|
62
|
+
<file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
|
|
63
|
+
</div>
|
|
64
|
+
</article>
|
|
65
|
+
<footer slot="modal-footer" class="modal-footer"></footer>
|
|
66
|
+
</modal>-->
|
|
67
|
+
<modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
|
|
68
|
+
:backdrop="false" :title="title">
|
|
69
|
+
<header slot="modal-header" class="modal-header">
|
|
70
|
+
<button type="button" class="close" @click="closeMaterials"><span>×</span></button>
|
|
71
|
+
<h4 class="modal-title">{{title}}</h4>
|
|
72
|
+
</header>
|
|
73
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
74
|
+
<div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
|
|
75
|
+
<div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
76
|
+
<div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
|
|
77
|
+
<div class="col-sm-6 text-right"><button
|
|
78
|
+
class="button_delete button_spacing"
|
|
79
|
+
@click.prevent="deleteDevicesinfo(i)"
|
|
80
|
+
v-if="title === '新增'"
|
|
81
|
+
>删除</button></div>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="form-group col-sm-6">
|
|
84
|
+
<label class="col-sm-4 control-label">选择材料:</label>
|
|
85
|
+
<div class="col-sm-8">
|
|
86
|
+
<input-select
|
|
87
|
+
class="select select_list"
|
|
88
|
+
:value.sync="item.material"
|
|
89
|
+
v-model="item.material"
|
|
90
|
+
:options="meterialOptions"
|
|
91
|
+
:disable="mark === 1"
|
|
92
|
+
@change="modifyOtherValue(i)"
|
|
93
|
+
:valueSingle="true"></input-select>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
<div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
|
|
97
|
+
<label class="col-sm-4 control-label">材料名称:</label>
|
|
98
|
+
<div class="col-sm-8">
|
|
99
|
+
<input class="form-control input_view" style="" type="text"
|
|
100
|
+
placeholder="材料名称"
|
|
101
|
+
v-model="item.f_material_name"
|
|
102
|
+
:value="item.f_material_name"
|
|
103
|
+
/>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
<div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
|
|
107
|
+
<label class="col-sm-4 control-label">材料型号:</label>
|
|
108
|
+
<div class="col-sm-8">
|
|
109
|
+
<input class="form-control input_view" style="" type="text"
|
|
110
|
+
placeholder="材料型号"
|
|
111
|
+
v-model="item.f_material_style"
|
|
112
|
+
:value="item.f_material_style"
|
|
113
|
+
/>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
<div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
|
|
117
|
+
<label class="col-sm-4 control-label">材料单位:</label>
|
|
118
|
+
<div class="col-sm-8">
|
|
119
|
+
<input class="form-control input_view" style="" type="text"
|
|
120
|
+
placeholder="材料单位"
|
|
121
|
+
v-model="item.f_material_unit"
|
|
122
|
+
:value="item.f_material_unit"
|
|
123
|
+
/>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
<div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
|
|
127
|
+
<label class="col-sm-4 control-label">材料数量:</label>
|
|
128
|
+
<div class="col-sm-8">
|
|
129
|
+
<input class="form-control input_view" style="" type="number"
|
|
130
|
+
placeholder="设备数量"
|
|
131
|
+
v-model="item.f_material_number"
|
|
132
|
+
:value="item.f_material_number"
|
|
133
|
+
/>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
<div class="form-group col-sm-6">
|
|
137
|
+
<label class="col-sm-4 control-label">材料价格:</label>
|
|
138
|
+
<div class="col-sm-8">
|
|
139
|
+
<input class="form-control input_view" style="" type="text"
|
|
140
|
+
placeholder="材料价格"
|
|
141
|
+
v-model="item.f_material_price"
|
|
142
|
+
:value="item.f_material_price"
|
|
143
|
+
/>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
|
|
148
|
+
</article>
|
|
149
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
150
|
+
<template v-if="mark !== 1">
|
|
151
|
+
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
|
|
152
|
+
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()" :disabled="!$v.valid">确认添加</button>
|
|
153
|
+
<button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()" :disabled="!$v.valid">确认修改</button>
|
|
154
|
+
</template>
|
|
155
|
+
</footer>
|
|
156
|
+
</modal>
|
|
157
|
+
<modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :backdrop="false" title="材料收费">
|
|
158
|
+
<header slot="modal-header" class="modal-header">
|
|
159
|
+
<button type="button" class="close" @click="closeModal"><span>×</span></button>
|
|
160
|
+
<h4 class="modal-title">材料收费</h4>
|
|
161
|
+
</header>
|
|
162
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
163
|
+
<div class="form-group col-sm-12">
|
|
164
|
+
<label class="col-sm-2 control-label">收费项目:</label>
|
|
165
|
+
<div class="col-sm-10">
|
|
166
|
+
<input type="text"
|
|
167
|
+
class="form-control input_view"
|
|
168
|
+
style="width: 100%"
|
|
169
|
+
readonly
|
|
170
|
+
v-model="charge.f_payment_term" />
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
<div class="form-group col-sm-12">
|
|
174
|
+
<label class="col-sm-2 control-label">收费金额:</label>
|
|
175
|
+
<div class="col-sm-10">
|
|
176
|
+
<input type="text"
|
|
177
|
+
class="form-control input_view"
|
|
178
|
+
style="width: 100%"
|
|
179
|
+
readonly
|
|
180
|
+
v-model="charge.f_charge_money" />
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
<div class="form-group col-sm-12">
|
|
184
|
+
<label class="col-sm-2 control-label">付款方式:</label>
|
|
185
|
+
<div class="col-sm-10">
|
|
186
|
+
<input-select
|
|
187
|
+
placeholder='请选择' width="100%"
|
|
188
|
+
v-model="charge.f_payment_method"
|
|
189
|
+
:value.sync="charge.f_payment_method"
|
|
190
|
+
:options='paymentMethod'
|
|
191
|
+
class="select select_list"
|
|
192
|
+
:value-single="true"
|
|
193
|
+
close-on-select ></input-select>
|
|
194
|
+
</div>
|
|
195
|
+
</div>
|
|
196
|
+
<div class="form-group col-sm-12">
|
|
197
|
+
<label class="col-sm-2 control-label">金额大写:</label>
|
|
198
|
+
<div class="col-sm-10">
|
|
199
|
+
<input type="text"
|
|
200
|
+
class="form-control input_view"
|
|
201
|
+
style="width: 100%"
|
|
202
|
+
:value="smalltoBIG(charge.f_charge_money)"
|
|
203
|
+
readonly
|
|
204
|
+
v-model="charge.f_amount_words" />
|
|
205
|
+
</div>
|
|
206
|
+
</div>
|
|
207
|
+
<div class="form-group col-sm-12">
|
|
208
|
+
<label class="col-sm-2 control-label">收费人员:</label>
|
|
209
|
+
<div class="col-sm-10">
|
|
210
|
+
<input type="text"
|
|
211
|
+
class="form-control input_view"
|
|
212
|
+
style="width: 100%"
|
|
213
|
+
readonly
|
|
214
|
+
v-model="charge.f_charge_collectors" />
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
217
|
+
</article>
|
|
218
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
219
|
+
<button type="button" class="btn btn-primary" @click="invalidApplyCharge()">确认收费</button>
|
|
220
|
+
</footer>
|
|
221
|
+
</modal>
|
|
222
|
+
</div>
|
|
223
|
+
</template>
|
|
224
|
+
|
|
225
|
+
<script>
|
|
226
|
+
import {HttpResetClass} from 'vue-client'
|
|
227
|
+
import Vue from "vue";
|
|
228
|
+
import {toStandardTimeString} from '../../../components/Util'
|
|
229
|
+
export default {
|
|
230
|
+
name: '材料添加',
|
|
231
|
+
props: {
|
|
232
|
+
selectdata: {
|
|
233
|
+
type: Object
|
|
234
|
+
},
|
|
235
|
+
mark: {
|
|
236
|
+
type: Number,
|
|
237
|
+
default: 0
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
data () {
|
|
241
|
+
return {
|
|
242
|
+
showFile: false,
|
|
243
|
+
onetomany: {
|
|
244
|
+
rows: []
|
|
245
|
+
},
|
|
246
|
+
title:'新增',
|
|
247
|
+
showMaterialModal:false,
|
|
248
|
+
materials:[
|
|
249
|
+
{
|
|
250
|
+
material:'',
|
|
251
|
+
f_material_name:'',
|
|
252
|
+
f_material_style:'',
|
|
253
|
+
f_material_unit:'',
|
|
254
|
+
f_material_number:'',
|
|
255
|
+
f_material_price:''
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
meterialOptions:[],
|
|
259
|
+
row:{},
|
|
260
|
+
pricesum:'',
|
|
261
|
+
showCharge:false,
|
|
262
|
+
charge:{
|
|
263
|
+
f_payment_term:'材料费',
|
|
264
|
+
f_charge_money:'',
|
|
265
|
+
f_payment_method:'',
|
|
266
|
+
f_amount_words:'',
|
|
267
|
+
f_charge_collectors:''
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
ready(){
|
|
272
|
+
this.getOnetoManyData()
|
|
273
|
+
},
|
|
274
|
+
methods: {
|
|
275
|
+
async getOnetoManyData () {
|
|
276
|
+
let data = {
|
|
277
|
+
tablename: `t_material_apply`,
|
|
278
|
+
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
279
|
+
}
|
|
280
|
+
let res = await this.$resetpost(
|
|
281
|
+
'rs/sql/apply_singleTable',
|
|
282
|
+
{data: data},
|
|
283
|
+
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
284
|
+
)
|
|
285
|
+
this.onetomany.rows = res.data
|
|
286
|
+
},
|
|
287
|
+
async openMaterialModal () {
|
|
288
|
+
this.getMateralNames()
|
|
289
|
+
this.title = '新增'
|
|
290
|
+
this.materials = [
|
|
291
|
+
{
|
|
292
|
+
material:'',
|
|
293
|
+
f_material_name:'',
|
|
294
|
+
f_material_style:'',
|
|
295
|
+
f_material_unit:'',
|
|
296
|
+
f_material_number:'',
|
|
297
|
+
f_material_price:''
|
|
298
|
+
}
|
|
299
|
+
],
|
|
300
|
+
this.showMaterialModal = true
|
|
301
|
+
},
|
|
302
|
+
closeFile() {
|
|
303
|
+
this.showWork = false
|
|
304
|
+
this.showFile = false
|
|
305
|
+
// 将选的文件清空
|
|
306
|
+
this.$refs.file.$el.querySelector('input').value = ''
|
|
307
|
+
this.search()
|
|
308
|
+
},
|
|
309
|
+
deleteDevicesinfo (index) {
|
|
310
|
+
this.materials.splice(index, 1)
|
|
311
|
+
},
|
|
312
|
+
pushMaterial () {
|
|
313
|
+
this.materials.push({
|
|
314
|
+
material:'',
|
|
315
|
+
f_material_name:'',
|
|
316
|
+
f_material_style:'',
|
|
317
|
+
f_material_unit:'',
|
|
318
|
+
f_material_number:'',
|
|
319
|
+
f_material_price:''
|
|
320
|
+
})
|
|
321
|
+
},
|
|
322
|
+
// 获取模态框材料
|
|
323
|
+
async getMateralNames () {
|
|
324
|
+
let data = {
|
|
325
|
+
condition: `1=1`
|
|
326
|
+
}
|
|
327
|
+
let http = new HttpResetClass()
|
|
328
|
+
let res = await http.load(
|
|
329
|
+
'POST',
|
|
330
|
+
`rs/sql/getStockMaterial`,
|
|
331
|
+
{data: data},
|
|
332
|
+
{resolveMsg: null, rejectMsg: '材料查询失败!!!'}
|
|
333
|
+
)
|
|
334
|
+
|
|
335
|
+
this.meterialOptions = res.data.map(item => {
|
|
336
|
+
return {
|
|
337
|
+
'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}--${item.f_material_code}`,
|
|
338
|
+
'value': item
|
|
339
|
+
}
|
|
340
|
+
})
|
|
341
|
+
},
|
|
342
|
+
modifyOtherValue (index){
|
|
343
|
+
console.log("进来了",index)
|
|
344
|
+
console.log("dddd",this.materials[index].material)
|
|
345
|
+
let material = this.materials[index].material
|
|
346
|
+
this.materials[index].f_material_name = material.f_material_name
|
|
347
|
+
this.materials[index].f_material_style = material.f_material_style
|
|
348
|
+
this.materials[index].f_material_unit = material.f_material_unit
|
|
349
|
+
this.materials[index].f_material_number = material.f_material_number
|
|
350
|
+
this.materials[index].f_material_price = material.f_material_price
|
|
351
|
+
},
|
|
352
|
+
// 新增材料
|
|
353
|
+
async addMaterial () {
|
|
354
|
+
console.log("登录信息:",this.$login.f)
|
|
355
|
+
this.title = '新增'
|
|
356
|
+
let data = {
|
|
357
|
+
f_process_id : this.selectdata.f_process_id,
|
|
358
|
+
f_operator_id: this.$login.f.id,
|
|
359
|
+
f_operator: this.$login.f.name,
|
|
360
|
+
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
361
|
+
f_orgid: this.$login.f.orgid,
|
|
362
|
+
f_orgname: this.$login.f.orgs,
|
|
363
|
+
materials:this.materials
|
|
364
|
+
}
|
|
365
|
+
let res = await this.$resetpost(
|
|
366
|
+
`rs/logic/saveMaterials`,
|
|
367
|
+
data
|
|
368
|
+
)
|
|
369
|
+
this.closeMaterials()
|
|
370
|
+
},
|
|
371
|
+
async deleteMaterial (row) {
|
|
372
|
+
var show1 = window.confirm('您确定要删除这条记录吗?')
|
|
373
|
+
if(show1 != true){
|
|
374
|
+
this.closeMaterials()
|
|
375
|
+
}else{
|
|
376
|
+
debugger
|
|
377
|
+
let http = new HttpResetClass()
|
|
378
|
+
let res = await http.load(
|
|
379
|
+
'POST',
|
|
380
|
+
`rs/logic/deleteMaterial`,
|
|
381
|
+
{data: row},
|
|
382
|
+
{resolveMsg: null, rejectMsg: '材料删除失败!!!'}
|
|
383
|
+
)
|
|
384
|
+
this.closeMaterials()
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
},
|
|
388
|
+
async updateMaterial (index,row) {
|
|
389
|
+
this.title = '修改'
|
|
390
|
+
this.row = row
|
|
391
|
+
this.getMateralNames()
|
|
392
|
+
this.materials = [
|
|
393
|
+
{
|
|
394
|
+
material:'',
|
|
395
|
+
f_material_name:row.f_material_name,
|
|
396
|
+
f_material_style:row.f_material_style,
|
|
397
|
+
f_material_unit:row.f_material_unit,
|
|
398
|
+
f_material_number:row.f_material_number,
|
|
399
|
+
f_material_price:row.f_material_price,
|
|
400
|
+
}
|
|
401
|
+
]
|
|
402
|
+
this.showMaterialModal = true
|
|
403
|
+
},
|
|
404
|
+
async updateConfirm () {
|
|
405
|
+
let data = this.row
|
|
406
|
+
data.f_material_name = this.materials[0].f_material_name
|
|
407
|
+
data.f_material_style = this.materials[0].f_material_style
|
|
408
|
+
data.f_material_unit = this.materials[0].f_material_unit
|
|
409
|
+
data.f_material_number = this.materials[0].f_material_number
|
|
410
|
+
data.f_material_price = this.materials[0].f_material_price
|
|
411
|
+
let res = await this.$resetpost(
|
|
412
|
+
`apply/rs/entity/t_material_apply`,
|
|
413
|
+
data
|
|
414
|
+
)
|
|
415
|
+
this.closeMaterials()
|
|
416
|
+
},
|
|
417
|
+
closeMaterials () {
|
|
418
|
+
this.getOnetoManyData()
|
|
419
|
+
this.showMaterialModal = false
|
|
420
|
+
},
|
|
421
|
+
// 金额转大写
|
|
422
|
+
smalltoBIG(n) {
|
|
423
|
+
let fraction = ['角', '分'];
|
|
424
|
+
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
425
|
+
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
426
|
+
let head = n < 0 ? '欠' : '';
|
|
427
|
+
n = Math.abs(n);
|
|
428
|
+
|
|
429
|
+
let s = '';
|
|
430
|
+
|
|
431
|
+
for (var i = 0; i < fraction.length; i++) {
|
|
432
|
+
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
433
|
+
}
|
|
434
|
+
s = s || '整';
|
|
435
|
+
n = Math.floor(n);
|
|
436
|
+
|
|
437
|
+
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
438
|
+
let p = '';
|
|
439
|
+
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
440
|
+
p = digit[n % 10] + unit[1][j] + p;
|
|
441
|
+
n = Math.floor(n / 10);
|
|
442
|
+
}
|
|
443
|
+
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
444
|
+
}
|
|
445
|
+
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
446
|
+
},
|
|
447
|
+
// 材料收费
|
|
448
|
+
chargeMaterial () {
|
|
449
|
+
this.showCharge = true
|
|
450
|
+
this.charge.f_charge_money = this.pricesum
|
|
451
|
+
this.charge.f_charge_collectors = this.$login.f.name
|
|
452
|
+
},
|
|
453
|
+
closeModal(){
|
|
454
|
+
this.showCharge = false
|
|
455
|
+
this.charge = {
|
|
456
|
+
f_payment_term:'材料费',
|
|
457
|
+
f_charge_money:'',
|
|
458
|
+
f_payment_method:'',
|
|
459
|
+
f_amount_words:'',
|
|
460
|
+
f_charge_collectors:''
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
invalidApplyCharge (){
|
|
464
|
+
this.$showMessage('确定是否收费?', ['confirm', 'cancel']).then(res=>{
|
|
465
|
+
if (res==='confirm'){
|
|
466
|
+
let http = new HttpResetClass()
|
|
467
|
+
this.charge.f_charge_status = '有效', // 缴费状态
|
|
468
|
+
this.charge.f_charge_date = toStandardTimeString(), // 缴费时间
|
|
469
|
+
this.charge.f_charge_collectors = this.$login.f.name, // 收费人员
|
|
470
|
+
this.charge.f_charge_collectors_id = this.$login.f.id, // 收费人员
|
|
471
|
+
this.charge.f_process_id = this.selectdata.f_process_id, // 报建流程id
|
|
472
|
+
this.charge.f_filiale = this.$login.f.orgs, // 分公司
|
|
473
|
+
this.charge.f_filialeid = this.$login.f.orgid, // 分公司id
|
|
474
|
+
this.charge.f_orgid = this.$login.f.orgid, // 组织id
|
|
475
|
+
this.charge.f_orgname = this.$login.f.orgs, // 组织
|
|
476
|
+
this.charge.f_depid = this.$login.f.depids, // 部门id
|
|
477
|
+
this.charge.f_depname = this.$login.f.f_department_name // 部门
|
|
478
|
+
http.load('post','apply/rs/entity/t_charge_record',this.charge,{rejectMsg:null,resolveMsg:'收费成功!!'}).then(res=>{
|
|
479
|
+
http.load('post','rs/logic/updatematerial',{data:{f_process_id: this.selectdata.f_process_id}},{rejectMsg:null,resolveMsg:null}).then(row=>{
|
|
480
|
+
if (row.data.code == '200'){
|
|
481
|
+
this.$dispatch('initializtionView')
|
|
482
|
+
}
|
|
483
|
+
})
|
|
484
|
+
})
|
|
485
|
+
}
|
|
486
|
+
})
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
events: {
|
|
490
|
+
'beforeFileUpload' (file) {
|
|
491
|
+
this.showWork = true
|
|
492
|
+
},
|
|
493
|
+
async 'onFileUpload'(file, result) {
|
|
494
|
+
let data = {
|
|
495
|
+
selectdata: this.selectdata,
|
|
496
|
+
filepath: result.f_downloadpath,
|
|
497
|
+
user: this.$login.f
|
|
498
|
+
}
|
|
499
|
+
try {
|
|
500
|
+
let res = await this.$resetpost(`rs/logic/importMaterial`, {data: data}, {
|
|
501
|
+
resolveMsg: null,
|
|
502
|
+
rejectMsg: '导入失败!!!',
|
|
503
|
+
silent: true
|
|
504
|
+
}, 0)
|
|
505
|
+
} catch (e) {
|
|
506
|
+
this.closeFile()
|
|
507
|
+
}
|
|
508
|
+
this.$dispatch('breakControl', this.selectdata)
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
watch: {
|
|
512
|
+
'onetomany.rows'(){
|
|
513
|
+
let res = this.onetomany.rows
|
|
514
|
+
this.pricesum = 0
|
|
515
|
+
if (res.length>0){
|
|
516
|
+
for (let row of res){
|
|
517
|
+
let num = row.f_material_price * row.f_material_number
|
|
518
|
+
this.pricesum += num
|
|
519
|
+
}
|
|
520
|
+
}else {
|
|
521
|
+
this.pricesum = 0
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
computed: {
|
|
526
|
+
paymentMethod() {
|
|
527
|
+
return this.$appdata.getParam("付款方式")
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
</script>
|
|
533
|
+
|
|
534
|
+
<style scoped>
|
|
535
|
+
|
|
536
|
+
</style>
|