telephone-clients 4.0.0-1-13 → 4.0.0-1-15

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.
@@ -13,44 +13,33 @@
13
13
  </div>
14
14
 
15
15
  <div class="y-form-item">
16
- <label>材料分类</label>
16
+ <label>材料名称</label>
17
17
  <input-select
18
18
  class="select select_list y-form-item-input"
19
19
  :value.sync="item.f_typename"
20
20
  v-model="item.f_typename"
21
21
  :options="category.options"
22
- @change="item.f_material_name = undefined, item.f_typenumber = undefined"
23
- :valueSingle="true">
24
- </input-select>
25
- </div>
26
-
27
- <div class="y-form-item">
28
- <label>材料名称</label>
29
- <input-select
30
- class="select select_list y-form-item-input"
31
- :value.sync="item.f_material_name"
32
- v-model="item.f_material_name"
33
- :options="category.children[item.f_typename].options"
34
22
  @change="item.f_typenumber = undefined"
35
23
  :valueSingle="true">
36
24
  </input-select>
37
25
  </div>
26
+
38
27
  <div class="y-form-item">
39
- <label>型号</label>
28
+ <label>材料型号</label>
40
29
  <input-select
41
30
  class="select select_list y-form-item-input"
42
31
  :value.sync="item.f_typenumber"
43
32
  v-model="item.f_typenumber"
44
- :options="category.children[item.f_typename].children[item.f_material_name].options"
33
+ :options="category.children[item.f_typename].options"
45
34
  :valueSingle="true">
46
35
  </input-select>
47
36
  </div>
48
37
  <div class="y-form-item">
49
38
  <label>单价(元/{{
50
- category.children[item.f_typename].children[item.f_material_name].children[item.f_typenumber].unit
39
+ category.children[item.f_typename].children[item.f_typenumber].unit
51
40
  }})</label>
52
41
  <input type="number" class="form-control y-form-item-input" v-model="item.f_material_price"
53
- :value="category.children[item.f_typename].children[item.f_material_name].children[item.f_typenumber].price"
42
+ :value="category.children[item.f_typename].children[item.f_typenumber].f_material_price"
54
43
  readonly>
55
44
  </div>
56
45
  <div class="y-form-item">
@@ -69,7 +58,8 @@
69
58
  </div>
70
59
  <div style="padding: 10px;display: flex;justify-content: space-around;">
71
60
  <button type="button" class="btn btn-primary" @click="addUserFile">添加</button>
72
- <button type="button" class="btn btn-primary" @click="showQrcodeButton">保存</button>
61
+ <button type="button" class="btn btn-primary" @click="saveMaterial" v-if="baocun == 'true'">保存</button>
62
+ <button type="button" class="btn btn-primary" @click="showCharge()" v-if="shoufei == 'true'">收费</button>
73
63
  </div>
74
64
  <div v-show="showQrCode">
75
65
  <div class="row">
@@ -100,7 +90,7 @@
100
90
  </div>
101
91
  <div style="padding: 10px;display: flex;justify-content: space-around;">
102
92
  <button type="button" name="button" class="btn btn-primary btn-sm" style="float: right;margin-right:10px;"
103
- @click="beforeSaveCharge()">收费
93
+ @click="beforeSaveCharge()">确认收费
104
94
  </button>
105
95
  <button type="button" class="btn btn-primary" @click="cancel">取消</button>
106
96
  </div>
@@ -121,6 +111,8 @@ export default {
121
111
  },
122
112
  data() {
123
113
  return {
114
+ baocun: this.$appdata.getSingleValue('材料收费保存'),
115
+ shoufei: this.$appdata.getSingleValue('材料收费收费'),
124
116
  othercharge_id: '',
125
117
  payState: false,
126
118
  zfCode: false,
@@ -136,7 +128,6 @@ export default {
136
128
  charge: {
137
129
  payment_terms: [{f_payment_term: '', f_charge_money: '', f_amount_words: '', f_payment_method: ''}]
138
130
  }, // 收费内容
139
- showCharge: false, // 收费显示
140
131
  timeLeft: 300, // 收费时间
141
132
  title1: '', // 二维码标题
142
133
  showQrCode: false, // 二维码显示
@@ -144,146 +135,155 @@ export default {
144
135
  f_cost_sum: 0, // 总收费
145
136
  }
146
137
  },
147
- ready() {
138
+ ready () {
148
139
  this.loadOptions()
149
140
  },
150
141
  methods: {
151
- cancel() {
142
+ cancel () {
152
143
  this.payNumber = 0
153
144
  this.othercharge_id = ''
154
145
  this.payState = false
155
146
  this.zfCode = false
156
147
  this.showQrCode = false
148
+ this.payType = ''
157
149
  clearTimeout(this.orderInterval)
158
150
  },
159
- getChangePayNumber() {
151
+ getChangePayNumber () {
160
152
  this.payNumber = 0
161
153
  for (let i = 0; i < this.material.length; i++) {
162
154
  this.material[i].f_fee = this.material[i].f_material_price * this.material[i].f_material_number
163
155
  this.payNumber += Number(this.material[i].f_fee)
164
156
  }
165
157
  },
166
- showQrcodeButton() {
167
- this.getChangePayNumber()
158
+ // 显示收费界面
159
+ async showCharge () {
160
+ if (this.material.length == 0) {
161
+ return this.$showMessage(`请先添加消耗的材料!`)
162
+ }
163
+ // 验证材料信息是否完整
164
+ for (let index = 0; index < this.material.length; index++) {
165
+ const item = this.material[index]
166
+ if (!item.f_typename) {
167
+ this.$showMessage(`请选择材料${index + 1}的材料名称`)
168
+ return;
169
+ }
170
+ if (!item.f_typenumber) {
171
+ this.$showMessage(`请选择材料${index + 1}的材料型号`)
172
+ return;
173
+ }
174
+ if (!item.f_material_price) {
175
+ this.$showMessage(`请填写材料${index + 1}的单价`)
176
+ return;
177
+ }
178
+ if (!item.f_material_number || item.f_material_number == 0) {
179
+ this.$showMessage(`请填写材料${index + 1}的数量`)
180
+ return;
181
+ }
182
+ }
183
+ await this.getChangePayNumber()
168
184
  this.showQrCode = true
169
185
  },
170
- loadOptions() {
186
+ // 保存材料信息
187
+ async saveMaterial () {
188
+ if (this.material.length == 0) {
189
+ return this.$showMessage(`请先添加消耗的材料!`)
190
+ }
191
+ for (let index = 0; index < this.material.length; index++) {
192
+ const item = this.material[index]
193
+ if (!item.f_typename) {
194
+ this.$showMessage(`请选择材料${index + 1}的材料名称`)
195
+ return;
196
+ }
197
+ if (!item.f_typenumber) {
198
+ this.$showMessage(`请选择材料${index + 1}的材料型号`)
199
+ return;
200
+ }
201
+ if (!item.f_material_price) {
202
+ this.$showMessage(`请填写材料${index + 1}的单价`)
203
+ return;
204
+ }
205
+ if (!item.f_material_number || item.f_material_number == 0) {
206
+ this.$showMessage(`请填写材料${index + 1}的数量`)
207
+ return;
208
+ }
209
+ }
210
+ await this.saveUserFile('save')
211
+ this.$showMessage('材料保存成功!!!')
212
+ },
213
+ async beforeSaveCharge () {
214
+ if (!this.payType) {
215
+ this.$showMessage(`请选择缴费方式`)
216
+ return;
217
+ }
218
+ if (this.payType.includes('二维码') && this.payNumber > 0) {
219
+ await this.openQrcode()
220
+ } else {
221
+ this.payState = true
222
+ await this.saveUserFile('save')
223
+ this.$showMessage('收费成功!!!')
224
+ this.cancel()
225
+ }
226
+ },
227
+ loadOptions () {
171
228
  const data = {
172
- tablename: 't_material_info',
173
- condition: `org_id = '${Vue.user.orgid}'`
229
+ tablename: 't_material_management',
230
+ condition: `1=1`
174
231
  }
175
232
  this.$resetpost(this.$androidUtil.getProxyUrl() + '/af-telephone/rs/sql/tel_singleTable', {data}, {
176
233
  resolveMsg: null,
177
234
  rejectMsg: '获取数据失败'
178
235
  }).then((res) => {
179
236
  const categories = []
180
- const materials = []
181
237
  const types = []
182
238
  for (let material of res.data) {
183
- if (material.type == '分类') {
239
+ if (material.f_material_stype == '分类') {
184
240
  categories.push(material)
185
- } else if (material.type == '品名') {
186
- materials.push(material)
187
- } else if (material.type == '型号') {
241
+ } else if (material.f_material_stype == '型号') {
188
242
  types.push(material)
189
243
  }
190
244
  }
191
245
  this.category.options = []
192
246
  for (let category of categories) {
193
247
  this.category.options.push({
194
- label: category.name,
195
- value: category.name
248
+ label: category.f_material_name,
249
+ value: category.f_material_name
196
250
  })
197
251
  }
198
252
 
199
253
  this.category.children = {}
200
254
  for (let category of categories) {
201
- this.category.children[category.name] = {}
255
+ this.category.children[category.f_material_name] = {
256
+ options: [],
257
+ children: {}
258
+ }
202
259
 
203
- this.category.children[category.name].options = []
204
- this.category.children[category.name].children = {}
205
- for (let material of materials) {
206
- if (material.parent_id == category.id) {
207
- this.category.children[category.name].options.push({
208
- label: material.name,
209
- value: material.name
260
+ for (let type of types) {
261
+ if (type.parent_id == category.id) {
262
+ this.category.children[category.f_material_name].options.push({
263
+ label: type.f_material_name,
264
+ value: type.f_material_name
210
265
  })
211
-
212
- this.category.children[category.name].children[material.name] = {}
213
-
214
- this.category.children[category.name].children[material.name].options = []
215
- this.category.children[category.name].children[material.name].children = {}
216
- for (let type of types) {
217
- if (type.parent_id == material.id) {
218
- this.category.children[category.name].children[material.name].options.push({
219
- label: type.name,
220
- value: type.name
221
- })
222
- this.category.children[category.name].children[material.name].children[type.name] = type
223
- }
224
- }
266
+ this.category.children[category.f_material_name].children[type.f_material_name] = type
225
267
  }
226
268
  }
227
269
  }
228
270
  console.log('this.category=', JSON.stringify(this.category))
229
- this.search()
230
271
  })
231
272
  },
232
273
  // 删除未保存的材料信息
233
- async deleteUserFile(index) {
274
+ async deleteUserFile (index) {
234
275
  this.material.splice(index, 1)
235
- this.cancel()
236
276
  },
237
277
  // 追加材料信息
238
- addUserFile() {
278
+ addUserFile () {
239
279
  this.material.push({})
240
- this, this.cancel()
241
- },
242
- search() {
243
- let http = new HttpResetClass()
244
- let data = {
245
- tablename: 't_material_service',
246
- condition: `f_process_id = '${this.selectdata.f_process_id}'`
247
- }
248
- http.load('post', this.$androidUtil.getProxyUrl() + '/af-telephone/rs/sql/tel_singleTable', {data: data}, {
249
- resolveMsg: null,
250
- rejectMsg: '获取数据失败'
251
- }).then(res => {
252
- this.material = res.data
253
- if (this.material.length <= 0) {
254
- this.material = [{}]
255
- }
256
- })
257
280
  },
258
- // 获取品名规格
259
- // setTypename(i, val) {
260
- // let ac = this.$appdata.getParam(val)
261
- // this.$set('material[' + i + '].typeNameList', ac)
262
- // this.$set('material[' + i + '].typeNumberList', [])
263
- // this.$set('material[' + i + '].f_typenumber', null)
264
- // this.$set('material[' + i + '].f_material_price', 0)
265
- // },
266
- // 获取类型
267
- // setTypenumber(i, val) {
268
- // let ac = this.$appdata.getParam(val)
269
- // this.$set('material[' + i + '].typeNumberList', ac)
270
- // this.$set('material[' + i + '].f_material_price', 0)
271
- // },
272
- // 获取单价
273
- // setmaterialprice(i, val) {
274
- // var num
275
- // if (val == null) {
276
- // num = 0
277
- // }
278
- // num = this.$appdata.getSingleValue(val)
279
- // this.$set('material[' + i + '].f_material_price', num)
280
- // },
281
281
  // 金额计算
282
- smallnum(val, val1) {
282
+ smallnum (val, val1) {
283
283
  let num = Number(val) * Number(val1)
284
284
  return num
285
285
  },
286
- qrcode(url) {
286
+ qrcode (url) {
287
287
  new QRCode('qrcode', {
288
288
  text: url, // 设置二维码内容或跳转地址
289
289
  width: 266, // 设置宽度,单位像素
@@ -291,18 +291,18 @@ export default {
291
291
  correctLevel: QRCode.CorrectLevel.L //容错率,L/M/Hs
292
292
  })
293
293
  },
294
- clearQrCode() {
294
+ clearQrCode () {
295
295
  if (document.getElementById('qrcode')) {
296
296
  document.getElementById('qrcode').innerHTML = ''
297
297
  }
298
298
  },
299
- async getOrderInformation() {
299
+ async getOrderInformation () {
300
300
  // 查询订单信息
301
301
  console.log('查询订单信息!!!')
302
302
  let http = new HttpResetClass()
303
303
  let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/wx/rs/weixin/orderStatus`, {
304
- "f_filiale": "wensuxilong",
305
- "out_trade_no": `${this.f_out_trade_no}`
304
+ "f_filiale": "wensuxilong",
305
+ "out_trade_no": `${this.f_out_trade_no}`
306
306
  }, {
307
307
  resolveMsg: null,
308
308
  rejectMsg: '订单查询失败!!!'
@@ -315,7 +315,7 @@ export default {
315
315
  this.cancel()
316
316
  }
317
317
  },
318
- async openQrcode() {
318
+ async openQrcode () {
319
319
  this.clearQrCode()
320
320
  let data = {
321
321
  tablename: 't_userfiles',
@@ -349,42 +349,7 @@ export default {
349
349
  }
350
350
  })
351
351
  },
352
- async beforeSaveCharge() {
353
-
354
-
355
- if (this.material.length == 0) {
356
- return this.$showMessage(`请先添加消耗的材料!`)
357
- }
358
- for (let index = 0; index < this.material.length; index++) {
359
- const item = this.material[index]
360
- if (!item.f_material_name) {
361
- this.$showMessage(`请选择材料${index + 1}的材料名称`)
362
- return;
363
- }
364
- if (!item.f_typenumber) {
365
- this.$showMessage(`请选择材料${index + 1}的型号`)
366
- return;
367
- }
368
- if (!item.f_material_price) {
369
- this.$showMessage(`请填写材料${index + 1}的单价`)
370
- return;
371
- }
372
- if (!item.f_material_number || item.f_material_number == 0) {
373
- this.$showMessage(`请填写材料${index + 1}的数量`)
374
- return;
375
- }
376
- }
377
- if (!this.payType) {
378
- this.$showMessage(`请选择缴费方式`)
379
- return;
380
- }
381
- if (this.payType.includes('二维码') && this.payNumber>0) {
382
- await this.openQrcode()
383
- } else {
384
- await this.saveUserFile('save')
385
- }
386
- },
387
- async saveUserFile(type) {
352
+ async saveUserFile (type) {
388
353
  for (let i = 0; i < this.material.length; i++) {
389
354
  this.material[i].f_process_id = this.selectdata.f_process_id
390
355
  this.material[i].f_department = Vue.user.f_department_name
@@ -395,7 +360,7 @@ export default {
395
360
  }
396
361
  await this.saveOrder(type)
397
362
  },
398
- async saveOrder(type) {
363
+ async saveOrder (type) {
399
364
  console.log('this.material', this.material)
400
365
  let otherdetail = []
401
366
  if (this.payNumber == 0) {
@@ -419,17 +384,20 @@ export default {
419
384
  }
420
385
  })
421
386
  }
422
- if (this.payState) {
423
- let other = {
387
+ let param = {
388
+ model: this.material,
389
+ operator_type: type,
390
+ othercharge_id: this.othercharge_id,
391
+ f_process_id: this.selectdata.f_process_id,
392
+ f_userinfo_id: this.selectdata.model.f_userinfo_id,
393
+ other: {
424
394
  "record_userinfo": this.selectdata.model.f_userinfo_id,
425
- //"f_userfiles_id": '',
426
- //"f_user_id": '',
427
395
  "f_user_name": this.selectdata.model.f_user_name,
428
396
  "f_address": this.selectdata.model.f_address,
429
397
  "f_user_type": this.selectdata.model.f_user_type,
430
398
  "f_gasproperties": "",
431
399
  "f_collection": this.payNumber,
432
- "f_comments": `${Vue.user.name}进行维修材料收费,收费方式-${this.payType} ${this.order.body && this.order.body.tradeNo ? '。支付订单号:' + this.order.body.tradeNo : ''}`,
400
+ "f_comments": `${Vue.user.name}进行维修材料收费,收费方式-${this.payType} ${this.order && this.order.f_out_trade_no ? '。支付订单号:' + this.order.f_out_trade_no : ''}`,
433
401
  "f_payment": this.payType,
434
402
  "f_voucher_number": this.selectdata.f_process_id,
435
403
  "f_bill_style": "普通收据",
@@ -437,7 +405,7 @@ export default {
437
405
  "f_service_person": Vue.user.name,
438
406
  "f_operat_type": "维修收费",
439
407
  "f_describe": "",
440
- "f_serial_id": this.order.body ? this.order.body.tradeNo : null,
408
+ "f_serial_id": this.order ? this.order.f_out_trade_no : null,
441
409
  "f_state": '有效',
442
410
  "f_operator": Vue.user.name,
443
411
  "f_operatorid": Vue.user.id,
@@ -450,20 +418,7 @@ export default {
450
418
  "f_fee_time": "12",
451
419
  "otherdetail": otherdetail
452
420
  }
453
- console.log("缴费记录保存", other)
454
- let res1 = await new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/sale_othercharge_logic`, other, {
455
- resolveMsg: null,
456
- rejectMsg: null
457
- })
458
- this.othercharge_id = res1.data.othercharge_id
459
- }
460
421
 
461
- let param = {
462
- model: this.material,
463
- operator_type: type,
464
- othercharge_id: this.othercharge_id,
465
- f_process_id: this.selectdata.f_process_id,
466
- f_userinfo_id: this.selectdata.model.f_userinfo_id
467
422
  }
468
423
  console.log("材料收费保存", param)
469
424
  let res = await new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/saveMaterialService`, param, {
@@ -471,339 +426,22 @@ export default {
471
426
  rejectMsg: null
472
427
  })
473
428
  if (res.data.code == 200) {
474
- if (type === 'create') {
475
- // this.$showMessage('收费记录创建成功!!!')
476
- // this.othercharge_id = res.data.othercharge_id
477
- // this.$emit('aftersave')
478
- } else {
429
+ if (type !== 'create') {
479
430
  this.$showMessage('材料保存成功!!!')
480
- this.$emit('aftersave')
481
431
  }
482
-
483
-
484
432
  } else {
485
433
  this.$showMessage(res.data.msg)
486
434
  }
487
435
  },
488
- // 关闭对话框
489
- // closeModal() {
490
- // this.showCharge = false
491
- // this.charge = {
492
- // payment_terms: [{
493
- // f_payment_term: '',
494
- // f_charge_money: '',
495
- // f_amount_words: '',
496
- // f_payment_method: this.charge.f_payment_method
497
- // }]
498
- // }
499
- // },
500
- // 金额转大写
501
- // handleInput(index) {
502
- // // 通过正则过滤小数点后两位
503
- // console.log('-----------------------')
504
- // this.charge.payment_terms[index].f_charge_money = (this.charge.payment_terms[index].f_charge_money.match(/^\d*(\.?\d{0,2})/g)[0]) || null
505
- // this.charge.payment_terms[index].f_amount_words = this.smalltoBIG(this.charge.payment_terms[index].f_charge_money)
506
- // },
507
- // 金额转大写
508
- // smalltoBIG(n) {
509
- // let fraction = ['角', '分'];
510
- // let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
511
- // let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
512
- // let head = n < 0 ? '欠' : '';
513
- // n = Math.abs(n);
514
- //
515
- // let s = '';
516
- //
517
- // for (var i = 0; i < fraction.length; i++) {
518
- // s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
519
- // }
520
- // s = s || '整';
521
- // n = Math.floor(n);
522
- //
523
- // for (var i = 0; i < unit[0].length && n > 0; i++) {
524
- // let p = '';
525
- // for (var j = 0; j < unit[1].length && n > 0; j++) {
526
- // p = digit[n % 10] + unit[1][j] + p;
527
- // n = Math.floor(n / 10);
528
- // }
529
- // s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
530
- // }
531
- // return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
532
- // },
533
- // moneyChange(index) {
534
- // console.log(`当前下标----${index}`)
535
- // if (isEmpty(this.charge.payment_terms[index].f_charge_money) || Number(this.charge.payment_terms[index].f_charge_money) === 0) {
536
- // this.$showMessage('单笔收费不能为0元!!!', 'warning', 3000)
537
- // this.charge.payment_terms[index].f_charge_money = null
538
- // return
539
- // }
540
- //
541
- // },
542
- // 打开二维码
543
- // async openQrCode() {
544
- // let http = new HttpResetClass()
545
- // for (let row = 0; row < this.charge.payment_terms.length; row++) {
546
- // console.log(this.charge.payment_terms[row])
547
- // if (isEmpty(this.charge.payment_terms[row].f_payment_term)) {
548
- // this.$showMessage('请选择收费项目!!!', 'warning', 3000)
549
- // return
550
- // } else if (isEmpty(this.charge.payment_terms[row].f_charge_money)) {
551
- // this.$showMessage('请输入收费金额!!!', 'warning', 3000)
552
- // return
553
- // }
554
- // }
555
- // if (this.charge.f_payment_method !== '微信支付' && this.charge.f_payment_method !== '支付宝支付') {
556
- // this.saveother()
557
- // this.$showMessage('缴费成功!')
558
- // this.update()
559
- // this.showCharge = false
560
- // return
561
- // }
562
- // if (this.charge.f_payment_method == '微信支付') {
563
- // this.title1 = '微信'
564
- // }
565
- // if (this.charge.f_payment_method == '支付宝支付') {
566
- // this.title1 = '支付宝'
567
- // }
568
- // this.showCharge = false
569
- // // 接口金额 单位为:分
570
- // let data = {
571
- // money: this.accMul(this.getTotalAmount(), 1) + '',
572
- // attach: {
573
- // "f_user": Vue.user.id,
574
- // "f_user_name": Vue.user.name
575
- // },
576
- // orderType: '工单收费',
577
- // userfilesid: '',
578
- // flag: 'JsApiWeiNan',
579
- // openid: '',
580
- // filiale: 'weinanchengtou'
581
- // }
582
- // // 下订单
583
- // await http.load('POST', `${this.$androidUtil.getProxyUrl()}/wx/rs/pay/jsApiPay`, data, {
584
- // resolveMsg: null,
585
- // rejectMsg: '订单生成失败!!!'
586
- // }).then(
587
- // res => {
588
- // this.order = res.data
589
- // this.showQrCode = true
590
- // this.$nextTick(() => {
591
- // this.qrcode()
592
- // })
593
- // // 剩余支付时间
594
- // this.paymentInterval = setInterval(() => {
595
- // this.timeLeft = this.timeLeft - 1
596
- // }, 1000)
597
- //
598
- // // 3秒查询一次订单支付信息
599
- // this.orderInterval = setInterval(() => {
600
- // this.getOrderInformation()
601
- // }, 3000)
602
- // }
603
- // )
604
- // },
605
- // getTotalAmount() {
606
- // let money = 0
607
- // this.charge.payment_terms.forEach((row) => {
608
- // money = Math.floor((Number(money) + Number(row.f_charge_money)) * 100) / 100
609
- // })
610
- // return money
611
- // },
612
- // getPaymentTerm() {
613
- // let term = ''
614
- // this.charge.payment_terms.forEach((row) => {
615
- // term += `${row.f_payment_term} `
616
- // })
617
- // return term
618
- // },
619
- // closeQRCode() {
620
- // clearTimeout(this.paymentInterval)
621
- // clearTimeout(this.orderInterval)
622
- // this.timeLeft = 300
623
- // this.closeOrder()
624
- // // 清除二维码
625
- // this.clearQrCode()
626
- // this.showQrCode = false
627
- // },
628
- // clearQrCode() {
629
- // document.getElementById('qrcode').innerHTML = ''
630
- // },
631
- // async closeOrder() {
632
- // let data = {
633
- // "flag": "JsApiWeiNan",
634
- // "f_filiale": "weinanchengtou",
635
- // "f_out_trade_no": this.order.f_out_trade_no,// 商户单号
636
- // "isClose": "是",
637
- // "f_sys_trace": this.order.f_sys_trace // 交易流水号
638
- // }
639
- // let http = new HttpResetClass()
640
- // let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/wx/rs/pay/microPayOrderStatus`, data, {
641
- // resolveMsg: null,
642
- // rejectMsg: '关闭失败!!!'
643
- // })
644
- // },
645
- // qrcode() {
646
- // let qrcode = new QRCode('qrcode', {
647
- // text: this.order.appId, // 设置二维码内容或跳转地址
648
- // width: 200, // 设置宽度,单位像素
649
- // height: 200, // 设置高度,单位像素
650
- // correctLevel: QRCode.CorrectLevel.L //容错率,L/M/Hs
651
- // })
652
- // },
653
- // // 获取订单信息
654
- // async getOrderInformation() {
655
- // // 查询订单信息
656
- // console.log('查询订单信息!!!')
657
- // let http = new HttpResetClass()
658
- // let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/sql/tel_singleTable`, {
659
- // data: {
660
- // tablename: "t_weixinreturnxml",
661
- // condition: ` f_out_trade_no = '${this.order.f_out_trade_no}' and f_order_state = '已支付' `,
662
- // }
663
- // }, {
664
- // resolveMsg: null,
665
- // rejectMsg: '订单查询失败!!!'
666
- // })
667
- // // 支付成功
668
- // if (res.data.length > 0) {
669
- // clearTimeout(this.paymentInterval)
670
- // clearTimeout(this.orderInterval)
671
- // this.timeLeft = 300
672
- // // 修改支付状态
673
- // this.saveother()
674
- // this.$showMessage('支付成功!!!')
675
- // this.update()
676
- // // 清除二维码
677
- // this.clearQrCode()
678
- // this.showQrCode = false
679
- // }
680
- // },
681
- // async update() {
682
- // let http = new HttpResetClass()
683
- // for (let i = 0; i < this.material.length; i++) {
684
- // if (this.material[i].f_state == '未收费') {
685
- // this.material[i].f_state = '已收费'
686
- // }
687
- // }
688
- // let data = {
689
- // model: this.material
690
- // }
691
- // let res = await http.load('post', this.$androidUtil.getProxyUrl() + '/af-telephone/rs/logic/saveweinanmaterial', {data: data}, {
692
- // resolveMsg: null,
693
- // rejectMsg: '保存失败'
694
- // })
695
- // this.search()
696
- // },
697
- // async saveother() {
698
- // let http = new HttpResetClass()
699
- // let data1 = {
700
- // tablename: 't_material_service',
701
- // condition: `f_process_id = '${this.selectdata.f_process_id}' and f_state = '未收费'`
702
- // }
703
- // let res1 = await http.load('post', this.$androidUtil.getProxyUrl() + '/af-telephone/rs/sql/tel_singleTable', {data: data1}, {
704
- // resolveMsg: null,
705
- // rejectMsg: '获取数据失败'
706
- // })
707
- // let data = {
708
- // tablename: 't_userfiles',
709
- // condition: `f_userinfo_id = '${this.selectdata.model.f_userinfo_id}'`
710
- // }
711
- // let res = await http.load('post', this.$androidUtil.getProxyUrl() + '/af-telephone/rs/sql/tel_singleTable', {data: data}, {
712
- // resolveMsg: null,
713
- // rejectMsg: '获取数据失败'
714
- // })
715
- // let otherdetails = []
716
- // for (let i = 0; i < res1.data.length; i++) {
717
- // otherdetails.push(
718
- // {
719
- // "f_brand_spec": [res1.data[i].f_material_name],
720
- // "f_unitprice": res1.data[i].f_material_price,
721
- // "f_typename": [res1.data[i].f_typename],
722
- // "f_typenumber": [res1.data[i].f_typenumber],
723
- // "f_number": res1.data[i].f_material_number
724
- // }
725
- // )
726
- // }
727
- //
728
- // console.log("查询的用户信息", otherdetails)
729
- // let data2 = {
730
- // "record_userinfo": this.selectdata.model.f_userinfo_id,
731
- // "f_userfiles_id": res.data[0].f_userfiles_id,
732
- // "f_user_id": res.data[0].f_user_id,
733
- // "f_user_name": this.selectdata.model.f_user_name,
734
- // "f_address": this.selectdata.model.f_address,
735
- // "f_user_type": this.selectdata.model.f_user_type,
736
- // "f_gasproperties": "",
737
- // "f_collection": this.f_cost_sum,
738
- // "f_comments": "",
739
- // "f_payment": this.charge.f_payment_method,
740
- // "f_voucher_number": "",
741
- // "f_bill_style": "普通收据",
742
- // "f_userinfo_id": this.selectdata.model.f_userinfo_id,
743
- // "f_service_person": Vue.user.name,
744
- // "f_operat_type": "其他收费",
745
- // "f_describe": "",
746
- // "f_state": "有效",
747
- // "f_operator": Vue.user.name,
748
- // "f_operatorid": Vue.user.id,
749
- // "f_orgid": Vue.user.orgid,
750
- // "f_orgname": Vue.user.orgs,
751
- // "f_depid": Vue.user.depids,
752
- // "f_depname": Vue.user.f_department_name,
753
- // "t_userfees": "",
754
- // "f_fee_type": "其他费用",
755
- // "f_fee_time": "12",
756
- // "otherdetail": otherdetails
757
- // }
758
- // let res2 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/sale_othercharge_logic`, {data: data2}, {
759
- // resolveMsg: null,
760
- // rejectMsg: '保存数据失败'
761
- // })
762
- // },
763
- // async shoufei() {
764
- // let http = new HttpResetClass()
765
- // let data = {
766
- // tablename: 't_material_service',
767
- // condition: `f_process_id = '${this.selectdata.f_process_id}' and f_state = '未收费'`
768
- // }
769
- // let res = await http.load('post', this.$androidUtil.getProxyUrl() + '/af-telephone/rs/sql/tel_singleTable', {data: data}, {
770
- // resolveMsg: null,
771
- // rejectMsg: '获取数据失败'
772
- // })
773
- // if (res.data.length <= 0) {
774
- // this.$showMessage('请先添加未收费的材料!!!')
775
- // return
776
- // }
777
- // this.f_cost_sum = 0
778
- // for (let i = 0; i < res.data.length; i++) {
779
- // this.f_cost_sum += Number(res.data[i].f_fee)
780
- // }
781
- // this.showCharge = true
782
- // this.charge.payment_terms[0].f_charge_money = this.f_cost_sum
783
- // },
784
- // accMul(arg1, arg2) {
785
- // let m = 0, s1 = arg1.toString(), s2 = arg2.toString();
786
- // try {
787
- // m += s1.split(".")[1].length
788
- // } catch (e) {
789
- // }
790
- // try {
791
- // m += s2.split(".")[1].length
792
- // } catch (e) {
793
- // }
794
- // return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)
795
- // },
796
436
  },
797
- events: {},
798
437
  computed: {
799
- paymentMethod() {
438
+ paymentMethod () {
800
439
  return this.$appdata.getParam("付款方式")
801
440
  },
802
- paymentTerm() {
441
+ paymentTerm () {
803
442
  return this.$appdata.getParam("收费项目")
804
443
  }
805
- },
806
- watch: {}
444
+ }
807
445
  }
808
446
  </script>
809
447
  <style lang="less" scoped>