apply-clients 3.3.2-80-test → 3.3.2-81-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/android/Process/AppServiceControl.vue +3 -0
- package/src/components/android/Process/Processes/AppAddMaterialCharge.vue +642 -0
- package/src/components/android/Process/Processes/AppAddMaterialScience.vue +45 -226
- package/src/components/android/Process/Processes/AppAddSetMeal.vue +602 -0
- package/src/components/product/GroupByApply/ApplyGroupAgreementList.vue +18 -2
- package/src/components/product/GroupByApply/ApplyGroupByAgreement.vue +1 -1
- package/src/components/product/GroupByApply/ApplyGroupContractList.vue +20 -0
- package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +117 -2
package/package.json
CHANGED
|
@@ -0,0 +1,642 @@
|
|
|
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">
|
|
14
|
+
<button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加
|
|
15
|
+
</button>
|
|
16
|
+
</th>
|
|
17
|
+
</tr>
|
|
18
|
+
</template>
|
|
19
|
+
<template partial='body'>
|
|
20
|
+
<tr>
|
|
21
|
+
<td style="text-align: center;">
|
|
22
|
+
<nobr>{{$index+1}}</nobr>
|
|
23
|
+
</td>
|
|
24
|
+
<td style="text-align: center;">
|
|
25
|
+
<nobr>{{row.f_material_name}}</nobr>
|
|
26
|
+
</td>
|
|
27
|
+
<td style="text-align: center;">
|
|
28
|
+
<nobr>{{row.f_material_style}}</nobr>
|
|
29
|
+
</td>
|
|
30
|
+
<td style="text-align: center;">
|
|
31
|
+
<nobr>{{row.f_material_unit}}</nobr>
|
|
32
|
+
</td>
|
|
33
|
+
<td style="text-align: center;">
|
|
34
|
+
<nobr>{{row.f_material_number}}</nobr>
|
|
35
|
+
</td>
|
|
36
|
+
<td style="text-align: center;">
|
|
37
|
+
<nobr>{{row.f_material_price}}</nobr>
|
|
38
|
+
</td>
|
|
39
|
+
<td style="text-align: center;">
|
|
40
|
+
<nobr>{{row.f_material_price*row.f_material_number}}</nobr>
|
|
41
|
+
</td>
|
|
42
|
+
<td style="text-align: center;">
|
|
43
|
+
<button type="button" class="button_search button_spacing"
|
|
44
|
+
@click="$parent.$parent.updateMaterial($index,row)">修改
|
|
45
|
+
</button>
|
|
46
|
+
<button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除
|
|
47
|
+
</button>
|
|
48
|
+
</td>
|
|
49
|
+
</tr>
|
|
50
|
+
</template>
|
|
51
|
+
</data-grid>
|
|
52
|
+
<modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
|
|
53
|
+
:backdrop="false" :title="title">
|
|
54
|
+
<header slot="modal-header" class="modal-header">
|
|
55
|
+
<button type="button" class="close" @click="closeMaterials"><span>×</span></button>
|
|
56
|
+
<h4 class="modal-title">{{title}}</h4>
|
|
57
|
+
</header>
|
|
58
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
59
|
+
<div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
|
|
60
|
+
<div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
61
|
+
<div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
|
|
62
|
+
<div class="col-sm-6 text-right">
|
|
63
|
+
<button
|
|
64
|
+
class="button_delete button_spacing"
|
|
65
|
+
@click.prevent="deleteDevicesinfo(i)"
|
|
66
|
+
v-if="title === '新增'"
|
|
67
|
+
>删除
|
|
68
|
+
</button>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
<div class="form-group col-sm-6">
|
|
72
|
+
<label class="col-sm-4 control-label">选择材料:</label>
|
|
73
|
+
<div class="col-sm-8">
|
|
74
|
+
<app-input-select
|
|
75
|
+
class="select select_list"
|
|
76
|
+
:value.sync="item.material"
|
|
77
|
+
v-model="item.material"
|
|
78
|
+
:options="meterialOptions"
|
|
79
|
+
:disable="mark === 1"
|
|
80
|
+
@change="modifyOtherValue(i)"
|
|
81
|
+
:valueSingle="true"></app-input-select>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
<div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
|
|
85
|
+
<label class="col-sm-4 control-label">材料名称:</label>
|
|
86
|
+
<div class="col-sm-8">
|
|
87
|
+
<input class="form-control input_view" style="" type="text"
|
|
88
|
+
placeholder="材料名称"
|
|
89
|
+
v-model="item.f_material_name"
|
|
90
|
+
:value="item.f_material_name"
|
|
91
|
+
/>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
<div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
|
|
95
|
+
<label class="col-sm-4 control-label">材料型号:</label>
|
|
96
|
+
<div class="col-sm-8">
|
|
97
|
+
<input class="form-control input_view" style="" type="text"
|
|
98
|
+
placeholder="材料型号"
|
|
99
|
+
v-model="item.f_material_style"
|
|
100
|
+
:value="item.f_material_style"
|
|
101
|
+
/>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
<div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
|
|
105
|
+
<label class="col-sm-4 control-label">材料单位:</label>
|
|
106
|
+
<div class="col-sm-8">
|
|
107
|
+
<input class="form-control input_view" style="" type="text"
|
|
108
|
+
placeholder="材料单位"
|
|
109
|
+
v-model="item.f_material_unit"
|
|
110
|
+
:value="item.f_material_unit"
|
|
111
|
+
/>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
<div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
|
|
115
|
+
<label class="col-sm-4 control-label">材料数量:</label>
|
|
116
|
+
<div class="col-sm-8">
|
|
117
|
+
<input class="form-control input_view" style="" type="number"
|
|
118
|
+
placeholder="材料数量"
|
|
119
|
+
v-model="item.f_material_number"
|
|
120
|
+
:value="item.f_material_number"
|
|
121
|
+
@change="ChangeMoney()"
|
|
122
|
+
/>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
<div class="form-group col-sm-6">
|
|
126
|
+
<label class="col-sm-4 control-label">材料单价:</label>
|
|
127
|
+
<div class="col-sm-8">
|
|
128
|
+
<input class="form-control input_view" style=""
|
|
129
|
+
placeholder="材料单价"
|
|
130
|
+
v-model="item.price"
|
|
131
|
+
:value.sync="item.price"
|
|
132
|
+
@change="ChangeMoney()"
|
|
133
|
+
/>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
<div v-if=" (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建')">
|
|
137
|
+
<app-qrcode-reader :istype = fmaterialname :index = i v-show="isShow[i]"></app-qrcode-reader>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
</article>
|
|
141
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
142
|
+
<template v-if="mark !== 1">
|
|
143
|
+
<span class="modal-title me-3">累计金额:{{totalmoney}}</span>
|
|
144
|
+
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
|
|
145
|
+
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterialBefore()"
|
|
146
|
+
:disabled="!$v.valid">确认添加
|
|
147
|
+
</button>
|
|
148
|
+
<button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()"
|
|
149
|
+
:disabled="!$v.valid">确认修改
|
|
150
|
+
</button>
|
|
151
|
+
</template>
|
|
152
|
+
</footer>
|
|
153
|
+
</modal>
|
|
154
|
+
<modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :large="true" :backdrop="false" title="收费明细">
|
|
155
|
+
<header slot="modal-header" class="modal-header">
|
|
156
|
+
<button type="button" class="close" @click="closeModal"><span>×</span></button>
|
|
157
|
+
<h4 class="modal-title">材料收费</h4>
|
|
158
|
+
</header>
|
|
159
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
160
|
+
<div class="form-group row vertical-center">
|
|
161
|
+
<label class="col-xs-4 control-label">付款方式:</label>
|
|
162
|
+
<div class="col-xs-8">
|
|
163
|
+
<input-select class="select select_list"
|
|
164
|
+
v-model="f_payment_method"
|
|
165
|
+
:value.sync="f_payment_method"
|
|
166
|
+
:options='paymentMethod'
|
|
167
|
+
@change="paymentMethodChange"
|
|
168
|
+
:value-single="true"
|
|
169
|
+
close-on-select ></input-select>
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
<div class="text-center" v-if="f_payment_method=='二维码'">
|
|
173
|
+
<p><b>收费金额:{{ totalmoney }}¥</b></p>
|
|
174
|
+
<div id="qrcode" class="qrcode" v-ref:qrcode></div>
|
|
175
|
+
<p>
|
|
176
|
+
等待支付,剩余 <span style="color: #ff791a">{{timeLeft}}</span> 秒
|
|
177
|
+
</p>
|
|
178
|
+
<button type="button" @click="closeQRCode">取消支付</button>
|
|
179
|
+
</div>
|
|
180
|
+
</article>
|
|
181
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
182
|
+
<button v-if="f_payment_method!='二维码'" id="savebut" type="button" class="btn btn-primary" @click.prevent="addMaterial()">确认</button>
|
|
183
|
+
</footer>
|
|
184
|
+
</modal>
|
|
185
|
+
</div>
|
|
186
|
+
</template>
|
|
187
|
+
<script>
|
|
188
|
+
import Vue from 'vue'
|
|
189
|
+
import {HttpResetClass} from 'vue-client'
|
|
190
|
+
import QRCode from 'qrcodejs2'
|
|
191
|
+
export default {
|
|
192
|
+
name: 'addMaterialScience',
|
|
193
|
+
props: {
|
|
194
|
+
selectdata: {
|
|
195
|
+
type: Object
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
data() {
|
|
199
|
+
return {
|
|
200
|
+
onetomany: {
|
|
201
|
+
rows: []
|
|
202
|
+
},
|
|
203
|
+
timeLeft: 120,
|
|
204
|
+
paymentInterval: null,
|
|
205
|
+
orderInterval: null,
|
|
206
|
+
order: null,
|
|
207
|
+
title: '新增',
|
|
208
|
+
showCharge: false,
|
|
209
|
+
showMaterialModal: false,
|
|
210
|
+
totalmoney:0,
|
|
211
|
+
f_payment_method:'',
|
|
212
|
+
materials: [
|
|
213
|
+
{
|
|
214
|
+
material: '',
|
|
215
|
+
f_material_name: '',
|
|
216
|
+
f_material_style: '',
|
|
217
|
+
f_material_unit: '',
|
|
218
|
+
f_material_number: '',
|
|
219
|
+
f_bjq_sid: '',
|
|
220
|
+
f_material_code: '',
|
|
221
|
+
price:0,
|
|
222
|
+
f_userinfo_code:''
|
|
223
|
+
}
|
|
224
|
+
],
|
|
225
|
+
meterialOptions: [],
|
|
226
|
+
row: {},
|
|
227
|
+
bjqChecklag:[],
|
|
228
|
+
fmaterialname:{},
|
|
229
|
+
filiale:"",
|
|
230
|
+
paymentMethod:[
|
|
231
|
+
{
|
|
232
|
+
value: '现金',
|
|
233
|
+
label: '现金'
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
value: '二维码',
|
|
237
|
+
label: '二维码'
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
isShow:[false],
|
|
241
|
+
charge: {
|
|
242
|
+
payment_terms:[]
|
|
243
|
+
},
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
ready() {
|
|
247
|
+
this.getOnetoManyData()
|
|
248
|
+
if (Vue.user.orgid == '10101') {
|
|
249
|
+
console.log('zhoukou')
|
|
250
|
+
this.filiale = 'zhoukou'
|
|
251
|
+
}else if (Vue.user.orgid == '35520') {
|
|
252
|
+
console.log('xiangcheng')
|
|
253
|
+
this.filiale = 'xiangcheng'
|
|
254
|
+
}else if (Vue.user.orgid == '35532') {
|
|
255
|
+
console.log('luyi')
|
|
256
|
+
this.filiale = 'luyi'
|
|
257
|
+
}else if (Vue.user.orgid == '35538') {
|
|
258
|
+
console.log('dancheng')
|
|
259
|
+
this.filiale = 'dancheng'
|
|
260
|
+
}else if (Vue.user.orgid == '35526') {
|
|
261
|
+
console.log('xihua')
|
|
262
|
+
this.filiale = 'xihua'
|
|
263
|
+
}else {
|
|
264
|
+
this.$showMessage('分公司异常,请联系管理员!')
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
methods: {
|
|
268
|
+
closeQRCode(){
|
|
269
|
+
this.clearQrCode()
|
|
270
|
+
this.f_payment_method=''
|
|
271
|
+
this.showCharge =false
|
|
272
|
+
clearInterval(this.paymentInterval)
|
|
273
|
+
clearInterval(this.orderInterval)
|
|
274
|
+
|
|
275
|
+
},
|
|
276
|
+
closeModal(){
|
|
277
|
+
this.showCharge= false
|
|
278
|
+
this.f_payment_method=''
|
|
279
|
+
clearInterval(this.paymentInterval)
|
|
280
|
+
clearInterval(this.orderInterval)
|
|
281
|
+
},
|
|
282
|
+
ChangeMoney() {
|
|
283
|
+
this.totalmoney = 0
|
|
284
|
+
for (let i = 0; i < this.materials.length; i++) {
|
|
285
|
+
const number = Number(this.materials[i].f_material_number) || 0
|
|
286
|
+
const price = Number(this.materials[i].price) || 0
|
|
287
|
+
this.totalmoney += this.accMul(number, price) // 复用高精度乘法
|
|
288
|
+
this.materials[i].f_userinfo_code = this.selectdata.f_userinfo_code || ''
|
|
289
|
+
}
|
|
290
|
+
// 保留2位小数,避免金额显示异常
|
|
291
|
+
this.totalmoney = Number(this.totalmoney.toFixed(2))
|
|
292
|
+
},
|
|
293
|
+
async getOnetoManyData () {
|
|
294
|
+
let http = new HttpResetClass()
|
|
295
|
+
let data = {
|
|
296
|
+
tablename: `t_material_apply`,
|
|
297
|
+
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
298
|
+
}
|
|
299
|
+
let res = await http.load(
|
|
300
|
+
'POST',
|
|
301
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable?aaa=123`,
|
|
302
|
+
{data: data},
|
|
303
|
+
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
304
|
+
)
|
|
305
|
+
this.onetomany.rows = res.data
|
|
306
|
+
},
|
|
307
|
+
async openMaterialModal() {
|
|
308
|
+
this.getMateralNames()
|
|
309
|
+
this.title = '新增'
|
|
310
|
+
this.materials = [
|
|
311
|
+
{
|
|
312
|
+
material: '',
|
|
313
|
+
f_material_name: '',
|
|
314
|
+
f_material_style: '',
|
|
315
|
+
f_material_unit: '',
|
|
316
|
+
f_material_number: '',
|
|
317
|
+
f_bjq_sid: '',
|
|
318
|
+
f_material_code: '',
|
|
319
|
+
price:0,
|
|
320
|
+
f_userinfo_code: ''
|
|
321
|
+
}
|
|
322
|
+
],
|
|
323
|
+
this.showMaterialModal = true
|
|
324
|
+
this.isShow = [false]
|
|
325
|
+
},
|
|
326
|
+
deleteDevicesinfo(index) {
|
|
327
|
+
this.materials.splice(index, 1)
|
|
328
|
+
this.isShow.splice(index, 1)
|
|
329
|
+
},
|
|
330
|
+
pushMaterial() {
|
|
331
|
+
this.materials.push({
|
|
332
|
+
material: '',
|
|
333
|
+
f_material_name: '',
|
|
334
|
+
f_material_style: '',
|
|
335
|
+
f_material_unit: '',
|
|
336
|
+
f_material_number: '',
|
|
337
|
+
f_bjq_sid: '',
|
|
338
|
+
f_material_code: '',
|
|
339
|
+
price:0,
|
|
340
|
+
f_userinfo_code: ''
|
|
341
|
+
})
|
|
342
|
+
this.isShow.push(false)
|
|
343
|
+
},
|
|
344
|
+
// 获取模态框材料
|
|
345
|
+
async getMateralNames() {
|
|
346
|
+
let data = {
|
|
347
|
+
condition: `1=1`
|
|
348
|
+
}
|
|
349
|
+
let http = new HttpResetClass()
|
|
350
|
+
let res = await http.load(
|
|
351
|
+
'POST',
|
|
352
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
|
|
353
|
+
{data: data},
|
|
354
|
+
{resolveMsg: null, rejectMsg: '材料查询失败!!!'}
|
|
355
|
+
)
|
|
356
|
+
|
|
357
|
+
this.meterialOptions = res.data.map(item => {
|
|
358
|
+
return {
|
|
359
|
+
'label': `${item.f_material_name}--${item.f_material_style}`,
|
|
360
|
+
'value': item
|
|
361
|
+
}
|
|
362
|
+
})
|
|
363
|
+
},
|
|
364
|
+
modifyOtherValue(index) {
|
|
365
|
+
console.log("进来了", index)
|
|
366
|
+
console.log("dddd", this.materials[index].material)
|
|
367
|
+
let material = this.materials[index].material
|
|
368
|
+
this.materials[index].f_material_name = material.f_material_name
|
|
369
|
+
this.materials[index].f_material_style = material.f_material_style
|
|
370
|
+
this.materials[index].f_material_unit = material.f_material_unit
|
|
371
|
+
this.materials[index].f_material_number = material.f_material_number
|
|
372
|
+
this.materials[index].f_material_code = material.f_material_code
|
|
373
|
+
this.materials[index].f_userinfo_code = material.f_userinfo_code
|
|
374
|
+
this.materials[index].price = material.price
|
|
375
|
+
if (material.f_material_name === "报警器-汉威") {
|
|
376
|
+
this.isShow[index] = true
|
|
377
|
+
} else {
|
|
378
|
+
this.isShow[index] = false
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
accMul(arg1,arg2) {
|
|
382
|
+
let m = 0, s1 = arg1.toString(), s2 = arg2.toString();
|
|
383
|
+
try {
|
|
384
|
+
m += s1.split(".")[1].length
|
|
385
|
+
} catch (e) {
|
|
386
|
+
}
|
|
387
|
+
try {
|
|
388
|
+
m += s2.split(".")[1].length
|
|
389
|
+
} catch (e) {
|
|
390
|
+
}
|
|
391
|
+
return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)
|
|
392
|
+
},
|
|
393
|
+
// 新增材料
|
|
394
|
+
async paymentMethodChange() {
|
|
395
|
+
if (this.f_payment_method == '二维码') {
|
|
396
|
+
let http = new HttpResetClass()
|
|
397
|
+
let data = {
|
|
398
|
+
money: this.accMul(this.totalmoney, 100),
|
|
399
|
+
attach: {
|
|
400
|
+
"f_type": '报建材料收费',
|
|
401
|
+
"f_user": Vue.user.id
|
|
402
|
+
},
|
|
403
|
+
str: "",
|
|
404
|
+
config: this.filiale,
|
|
405
|
+
f_revenue: "productV3"
|
|
406
|
+
}
|
|
407
|
+
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/ICBCGetCode`, data, {
|
|
408
|
+
resolveMsg: null,
|
|
409
|
+
rejectMsg: '订单生成失败!!!'
|
|
410
|
+
})
|
|
411
|
+
console.log('=================================')
|
|
412
|
+
console.log(JSON.stringify(res.data))
|
|
413
|
+
this.order = res.data
|
|
414
|
+
this.qrcode()
|
|
415
|
+
this.paymentInterval = setInterval(() => {
|
|
416
|
+
this.timeLeft = this.timeLeft - 1
|
|
417
|
+
if (this.timeLeft <= 0) {
|
|
418
|
+
this.$showMessage('支付超时,请重新发起支付')
|
|
419
|
+
this.closeQRCode() // 调用已有的取消支付方法
|
|
420
|
+
}
|
|
421
|
+
}, 1000)
|
|
422
|
+
this.orderInterval = setInterval(() => {
|
|
423
|
+
this.getOrderInformation()
|
|
424
|
+
},3000)
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
async addMaterialBefore() {
|
|
428
|
+
this.timeLeft= 120
|
|
429
|
+
this.showCharge= true
|
|
430
|
+
},
|
|
431
|
+
// 获取订单信息
|
|
432
|
+
async getOrderInformation () {
|
|
433
|
+
let http = new HttpResetClass()
|
|
434
|
+
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {
|
|
435
|
+
data: {
|
|
436
|
+
items: "id",
|
|
437
|
+
tablename: "t_weixinreturnxml",
|
|
438
|
+
condition: ` f_out_trade_no = '${this.order.f_out_trade_no}' and f_bill_state = 1 `,
|
|
439
|
+
orderitem: "id"
|
|
440
|
+
}
|
|
441
|
+
}, {
|
|
442
|
+
resolveMsg: null,
|
|
443
|
+
rejectMsg: '订单查询失败!!!'
|
|
444
|
+
})
|
|
445
|
+
if (res.data.length > 0) {
|
|
446
|
+
this.$showMessage('支付成功!!!')
|
|
447
|
+
clearTimeout(this.paymentInterval)
|
|
448
|
+
clearTimeout(this.orderInterval)
|
|
449
|
+
this.timeLeft = 10
|
|
450
|
+
// 清除二维码
|
|
451
|
+
this.clearQrCode()
|
|
452
|
+
this.addMaterial()
|
|
453
|
+
this.saveCharge()
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
qrcode () {
|
|
457
|
+
let qrcode = new QRCode('qrcode',{
|
|
458
|
+
text: this.order.url, // 设置二维码内容或跳转地址
|
|
459
|
+
width: 200, // 设置宽度,单位像素
|
|
460
|
+
height: 200, // 设置高度,单位像素
|
|
461
|
+
correctLevel: QRCode.CorrectLevel.L //容错率,L/M/Hs
|
|
462
|
+
})
|
|
463
|
+
},
|
|
464
|
+
clearQrCode () {
|
|
465
|
+
document.getElementById('qrcode').innerHTML = ''
|
|
466
|
+
},
|
|
467
|
+
async addMaterial() {
|
|
468
|
+
this.title = '新增'
|
|
469
|
+
let data = {
|
|
470
|
+
f_process_id: this.selectdata.f_process_id,
|
|
471
|
+
f_operator_id: Vue.user.id,
|
|
472
|
+
f_operator: Vue.user.name,
|
|
473
|
+
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
474
|
+
f_orgid: Vue.user.orgid,
|
|
475
|
+
f_orgname: Vue.user.orgs,
|
|
476
|
+
materials: this.materials
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
//报警器流程 设备编号检验
|
|
480
|
+
await this.bjqCheck()
|
|
481
|
+
if (this.bjqChecklag.length > 0) {
|
|
482
|
+
return
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
let http = new HttpResetClass()
|
|
486
|
+
let res = await http.load(
|
|
487
|
+
'POST',
|
|
488
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/saveMaterials`,
|
|
489
|
+
data
|
|
490
|
+
)
|
|
491
|
+
this.closeMaterials()
|
|
492
|
+
},
|
|
493
|
+
saveCharge(){
|
|
494
|
+
for (let i = 0; i < this.materials.length; i++) {
|
|
495
|
+
this.charge.payment_terms.push(
|
|
496
|
+
{
|
|
497
|
+
f_payment_term: this.materials[i].f_material_name,
|
|
498
|
+
f_charge_money: this.materials[i].price,
|
|
499
|
+
f_amount_words:this.smalltoBIG(this.materials[i].price),
|
|
500
|
+
f_payment_method : '手机APP'
|
|
501
|
+
})
|
|
502
|
+
}
|
|
503
|
+
let info = {
|
|
504
|
+
apply: this.selectdata,
|
|
505
|
+
charge: this.charge,
|
|
506
|
+
user: Vue.user,
|
|
507
|
+
f_out_trade_no:this.order.f_out_trade_no
|
|
508
|
+
}
|
|
509
|
+
http.load('POST',`${this.$androidUtil.getProxyUrl()}/rs/logic/NewAddChargeRecord`,{data:info},{
|
|
510
|
+
resolveMsg: null,
|
|
511
|
+
rejectMsg: null
|
|
512
|
+
})
|
|
513
|
+
},
|
|
514
|
+
async addMaterialAfter() {
|
|
515
|
+
let data = {
|
|
516
|
+
f_out_trade_no:this.order.f_out_trade_no
|
|
517
|
+
}
|
|
518
|
+
//报警器流程 设备编号检验
|
|
519
|
+
await this.bjqCheck()
|
|
520
|
+
if (this.bjqChecklag.length > 0) {
|
|
521
|
+
return
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
let http = new HttpResetClass()
|
|
525
|
+
let res = await http.load(
|
|
526
|
+
'POST',
|
|
527
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/SaveMaterialsAfter`,
|
|
528
|
+
data
|
|
529
|
+
)
|
|
530
|
+
this.closeMaterials()
|
|
531
|
+
},
|
|
532
|
+
async deleteMaterial(row) {
|
|
533
|
+
|
|
534
|
+
var show1 = window.confirm('您确定要删除这条记录吗?')
|
|
535
|
+
if(show1 != true){
|
|
536
|
+
this.closeMaterials()
|
|
537
|
+
}else{
|
|
538
|
+
let http = new HttpResetClass()
|
|
539
|
+
let res = await http.load(
|
|
540
|
+
'POST',
|
|
541
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/deleteMaterialapply`,
|
|
542
|
+
{data: row},
|
|
543
|
+
{resolveMsg: null, rejectMsg: '材料删除失败!!!'}
|
|
544
|
+
)
|
|
545
|
+
this.closeMaterials()
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
async updateMaterial(index, row) {
|
|
549
|
+
this.title = '修改'
|
|
550
|
+
this.row = row
|
|
551
|
+
this.getMateralNames()
|
|
552
|
+
this.materials = [
|
|
553
|
+
{
|
|
554
|
+
material: '',
|
|
555
|
+
f_material_name: row.f_material_name,
|
|
556
|
+
f_material_style: row.f_material_style,
|
|
557
|
+
f_material_unit: row.f_material_unit,
|
|
558
|
+
f_material_number: row.f_material_number,
|
|
559
|
+
f_material_code: row.f_material_code,
|
|
560
|
+
f_bjq_sid: row.f_bjq_sid,
|
|
561
|
+
f_userinfo_code: row.f_userinfo_code,
|
|
562
|
+
price:row.f_material_price
|
|
563
|
+
}
|
|
564
|
+
]
|
|
565
|
+
this.showMaterialModal = true
|
|
566
|
+
},
|
|
567
|
+
async updateConfirm() {
|
|
568
|
+
let data = this.row
|
|
569
|
+
data.f_material_name = this.materials[0].f_material_name
|
|
570
|
+
data.f_material_style = this.materials[0].f_material_style
|
|
571
|
+
data.f_material_unit = this.materials[0].f_material_unit
|
|
572
|
+
data.f_material_number = this.materials[0].f_material_number
|
|
573
|
+
data.f_material_code = this.materials[0].f_material_code
|
|
574
|
+
data.f_bjq_sid = this.materials[0].f_bjq_sid
|
|
575
|
+
data.f_userinfo_code=this.materials[0].f_userinfo_code
|
|
576
|
+
data.f_material_price = this.materials[0].price
|
|
577
|
+
//报警器流程 设备编号检验
|
|
578
|
+
await this.bjqCheck()
|
|
579
|
+
if (this.bjqChecklag.length > 0){
|
|
580
|
+
return
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
let http = new HttpResetClass()
|
|
584
|
+
let res = await http.load(
|
|
585
|
+
'POST',
|
|
586
|
+
`${this.$androidUtil.getProxyUrl()}/rs/entity/t_material_apply`,
|
|
587
|
+
data
|
|
588
|
+
)
|
|
589
|
+
this.closeMaterials()
|
|
590
|
+
},
|
|
591
|
+
sycronizedCode(index,val){
|
|
592
|
+
console.log("看看:",index,val)
|
|
593
|
+
this.materials[index].f_material_code = val
|
|
594
|
+
},
|
|
595
|
+
closeMaterials() {
|
|
596
|
+
this.getOnetoManyData()
|
|
597
|
+
this.showMaterialModal = false
|
|
598
|
+
this.showCharge= false
|
|
599
|
+
},
|
|
600
|
+
async bjqCheck(){
|
|
601
|
+
//报警器设备型号校验
|
|
602
|
+
this.bjqChecklag = [] //初始化
|
|
603
|
+
if (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建'){
|
|
604
|
+
let bjqinfo = {
|
|
605
|
+
f_material_name : "",
|
|
606
|
+
f_bjq_sid: ""
|
|
607
|
+
}
|
|
608
|
+
for (const bjqinfoElement of this.materials) {
|
|
609
|
+
bjqinfo.f_bjq_sid = bjqinfoElement.f_bjq_sid
|
|
610
|
+
bjqinfo.f_material_name = bjqinfoElement.f_material_name
|
|
611
|
+
if (bjqinfo.f_material_name.substr(0,3) === '报警器'){
|
|
612
|
+
let http = new HttpResetClass()
|
|
613
|
+
let res = await http.load(
|
|
614
|
+
'POST',
|
|
615
|
+
// `/rs/logic/bjqcheck`,
|
|
616
|
+
`${this.$androidUtil.getProxyUrl()}/ncc/rs/logic/bjqcheck`,
|
|
617
|
+
bjqinfo
|
|
618
|
+
)
|
|
619
|
+
if (res.data.code != 200){
|
|
620
|
+
this.bjqChecklag.push(res.data.code)
|
|
621
|
+
//this.$showMessage(res.data.msg)
|
|
622
|
+
Vue.showAlert(res.data.msg, 'danger', 6000)
|
|
623
|
+
return
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
},
|
|
630
|
+
beforeDestroy() {
|
|
631
|
+
clearInterval(this.paymentInterval)
|
|
632
|
+
clearInterval(this.orderInterval)
|
|
633
|
+
this.clearQrCode() // 清理二维码DOM
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
</script>
|
|
639
|
+
|
|
640
|
+
<style scoped>
|
|
641
|
+
|
|
642
|
+
</style>
|