sale-client 3.6.353 → 3.6.356

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.
File without changes
@@ -0,0 +1,2 @@
1
+ #Wed Jul 31 10:14:59 CST 2024
2
+ gradle.version=5.2.1
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.6.353",
3
+ "version": "3.6.356",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/LodopFuncs.js CHANGED
@@ -1,56 +1,69 @@
1
1
  var CreatedOKLodop7766 = null
2
2
 
3
+ function loadScriptAsync(src) {
4
+ return new Promise((resolve, reject) => {
5
+ var script = document.createElement('script')
6
+ script.src = src
7
+ script.async = true
8
+ script.onload = resolve
9
+ script.onerror = reject
10
+ document.head.appendChild(script)
11
+ })
12
+ }
13
+
3
14
  // ====判断是否需要安装CLodop云打印服务器:====
4
- function needCLodop () {
15
+ function needCLodop() {
5
16
  // return false;
6
17
  try {
7
- var ua = navigator.userAgent
8
- if (ua.match(/Windows\sPhone/i) != null) return true
9
- if (ua.match(/iPhone|iPod/i) != null) return true
10
- if (ua.match(/Android/i) != null) return true
11
- if (ua.match(/Edge\D?\d+/i) != null) return true
12
- if (ua.match(/QQBrowser/i) != null) return false
13
- var verTrident = ua.match(/Trident\D?\d+/i)
14
- var verIE = ua.match(/MSIE\D?\d+/i)
15
- var verOPR = ua.match(/OPR\D?\d+/i)
16
- var verFF = ua.match(/Firefox\D?\d+/i)
17
- var x64 = ua.match(/x64/i)
18
- if ((verTrident == null) && (verIE == null) && (x64 !== null)) { return true } else
19
- if (verFF !== null) {
20
- verFF = verFF[0].match(/\d+/)
21
- if (verFF[0] >= 42) return true
22
- } else
23
- if (verOPR !== null) {
24
- verOPR = verOPR[0].match(/\d+/)
25
- if (verOPR[0] >= 32) return true
26
- } else
27
- if ((verTrident == null) && (verIE == null)) {
28
- var verChrome = ua.match(/Chrome\D?\d+/i)
29
- if (verChrome !== null) {
30
- verChrome = verChrome[0].match(/\d+/)
31
- if (verChrome[0] >= 42) return true
32
- };
33
- };
18
+ var ua = navigator.userAgent
19
+ if (ua.match(/Windows\sPhone/i) != null) return true
20
+ if (ua.match(/iPhone|iPod/i) != null) return true
21
+ if (ua.match(/Android/i) != null) return true
22
+ if (ua.match(/Edge\D?\d+/i) != null) return true
23
+ if (ua.match(/QQBrowser/i) != null) return false
24
+ var verTrident = ua.match(/Trident\D?\d+/i)
25
+ var verIE = ua.match(/MSIE\D?\d+/i)
26
+ var verOPR = ua.match(/OPR\D?\d+/i)
27
+ var verFF = ua.match(/Firefox\D?\d+/i)
28
+ var x64 = ua.match(/x64/i)
29
+ if ((verTrident == null) && (verIE == null) && (x64 !== null)) {
30
+ return true
31
+ } else if (verFF !== null) {
32
+ verFF = verFF[0].match(/\d+/)
33
+ if (verFF[0] >= 42) return true
34
+ } else if (verOPR !== null) {
35
+ verOPR = verOPR[0].match(/\d+/)
36
+ if (verOPR[0] >= 32) return true
37
+ } else if ((verTrident == null) && (verIE == null)) {
38
+ var verChrome = ua.match(/Chrome\D?\d+/i)
39
+ if (verChrome !== null) {
40
+ verChrome = verChrome[0].match(/\d+/)
41
+ if (verChrome[0] >= 42) return true
42
+ }
43
+ ;
44
+ }
45
+ ;
34
46
  return false
35
- } catch (err) { return true };
47
+ } catch (err) {
48
+ return true
49
+ }
50
+ ;
36
51
  };
37
52
 
38
53
  // ====页面引用CLodop云打印必须的JS文件:====
39
54
  if (needCLodop()) {
40
- var head = document.head || document.getElementsByTagName('head')[0] || document.documentElement
41
- var oscript = document.createElement('script')
42
- // 让本机浏览器打印(更优先)
43
- oscript = document.createElement('script')
44
- oscript.src = 'http://localhost:8000/CLodopfuncs.js?priority=1'
45
- head.insertBefore(oscript, head.firstChild)
46
- // 本机浏览器的后补端口8001:
47
- // oscript = document.createElement("script");
48
- // oscript.src ="http://localhost:8001/CLodopfuncs.js?priority=2";
49
- // head.insertBefore( oscript,head.firstChild );
50
- };
55
+ loadScriptAsync('http://localhost:18000/CLodopfuncs.js?priority=1')
56
+ .then(() => {
57
+ console.log('CLodop script loaded successfully.')
58
+ // 这里可以继续执行其他需要在脚本加载完后执行的逻辑
59
+ })
60
+ .catch((error) => {
61
+ console.error('Failed to load CLodop script:', error)
62
+ })
63
+ }
51
64
 
52
65
  // ====获取LODOP对象的主过程:====
53
- function getLodop (oOBJECT, oEMBED) {
66
+ function getLodop(oOBJECT, oEMBED) {
54
67
  var strHtmInstall = "<br><font color='#FF00FF'>打印控件未安装!点击这里<a href='http://113.10.155.131/install_lodop32.zip' target='_self'>执行安装</a>,安装后请刷新页面或重新进入。</font>"
55
68
  var strHtmUpdate = "<br><font color='#FF00FF'>打印控件需要升级!点击这里<a href='http://113.10.155.131/install_lodop32.zip' target='_self'>执行升级</a>,升级后请重新进入。</font>"
56
69
  var strHtm64_Install = "<br><font color='#FF00FF'>打印控件未安装!点击这里<a href='http://113.10.155.131/install_lodop64.zip' target='_self'>执行安装</a>,安装后请刷新页面或重新进入。</font>"
@@ -63,21 +76,35 @@ function getLodop (oOBJECT, oEMBED) {
63
76
  try {
64
77
  var isIE = (navigator.userAgent.indexOf('MSIE') >= 0) || (navigator.userAgent.indexOf('Trident') >= 0)
65
78
  if (needCLodop()) {
66
- try { LODOP = getCLodop() } catch (err) {};
67
- if (!LODOP && document.readyState !== 'complete') { alert('C-Lodop没准备好,请稍后再试!'); return };
79
+ try {
80
+ LODOP = getCLodop()
81
+ } catch (err) {
82
+ }
83
+ ;
84
+ if (!LODOP && document.readyState !== 'complete') {
85
+ alert('C-Lodop没准备好,请稍后再试!');
86
+ return
87
+ }
88
+ ;
68
89
  if (!LODOP) {
69
- if (isIE) document.write(strCLodopInstall); else { document.documentElement.innerHTML = strCLodopInstall + document.documentElement.innerHTML }
90
+ if (isIE) document.write(strCLodopInstall); else {
91
+ document.documentElement.innerHTML = strCLodopInstall + document.documentElement.innerHTML
92
+ }
70
93
  return
71
94
  } else {
72
- if (CLODOP.CVERSION < '2.0.6.2') {
73
- if (isIE) document.write(strCLodopUpdate); else { document.documentElement.innerHTML = strCLodopUpdate + document.documentElement.innerHTML }
74
- };
75
- if (oEMBED && oEMBED.parentNode) oEMBED.parentNode.removeChild(oEMBED)
76
- if (oOBJECT && oOBJECT.parentNode) oOBJECT.parentNode.removeChild(oOBJECT)
77
- };
95
+ if (CLODOP.CVERSION < '2.0.6.2') {
96
+ if (isIE) document.write(strCLodopUpdate); else {
97
+ document.documentElement.innerHTML = strCLodopUpdate + document.documentElement.innerHTML
98
+ }
99
+ }
100
+ ;
101
+ if (oEMBED && oEMBED.parentNode) oEMBED.parentNode.removeChild(oEMBED)
102
+ if (oOBJECT && oOBJECT.parentNode) oOBJECT.parentNode.removeChild(oOBJECT)
103
+ }
104
+ ;
78
105
  } else {
79
106
  var is64IE = isIE && (navigator.userAgent.indexOf('x64') >= 0)
80
- // =====如果页面有Lodop就直接使用,没有则新建:==========
107
+ // =====如果页面有Lodop就直接使用,没有则新建:==========
81
108
  if (oOBJECT != undefined || oEMBED != undefined) {
82
109
  if (isIE) LODOP = oOBJECT; else LODOP = oEMBED
83
110
  } else if (CreatedOKLodop7766 == null) {
@@ -90,26 +117,39 @@ function getLodop (oOBJECT, oEMBED) {
90
117
  document.documentElement.appendChild(LODOP)
91
118
  CreatedOKLodop7766 = LODOP
92
119
  } else LODOP = CreatedOKLodop7766
93
- // =====Lodop插件未安装时提示下载地址:==========
120
+ // =====Lodop插件未安装时提示下载地址:==========
94
121
  if ((LODOP == null) || (typeof (LODOP.VERSION) == 'undefined')) {
95
- if (navigator.userAgent.indexOf('Chrome') >= 0) { document.documentElement.innerHTML = strHtmChrome + document.documentElement.innerHTML }
96
- if (navigator.userAgent.indexOf('Firefox') >= 0) { document.documentElement.innerHTML = strHtmFireFox + document.documentElement.innerHTML }
97
- if (is64IE) document.write(strHtm64_Install); else
98
- if (isIE) document.write(strHtmInstall); else { document.documentElement.innerHTML = strHtmInstall + document.documentElement.innerHTML }
122
+ if (navigator.userAgent.indexOf('Chrome') >= 0) {
123
+ document.documentElement.innerHTML = strHtmChrome + document.documentElement.innerHTML
124
+ }
125
+ if (navigator.userAgent.indexOf('Firefox') >= 0) {
126
+ document.documentElement.innerHTML = strHtmFireFox + document.documentElement.innerHTML
127
+ }
128
+ if (is64IE) document.write(strHtm64_Install); else if (isIE) document.write(strHtmInstall); else {
129
+ document.documentElement.innerHTML = strHtmInstall + document.documentElement.innerHTML
130
+ }
99
131
  return LODOP
100
- };
101
- };
132
+ }
133
+ ;
134
+ }
135
+ ;
102
136
  if (LODOP.VERSION < '6.2.0.3') {
103
- if (needCLodop()) { document.documentElement.innerHTML = strCLodopUpdate + document.documentElement.innerHTML } else
104
- if (is64IE) document.write(strHtm64_Update); else
105
- if (isIE) document.write(strHtmUpdate); else { document.documentElement.innerHTML = strHtmUpdate + document.documentElement.innerHTML }
137
+ if (needCLodop()) {
138
+ document.documentElement.innerHTML = strCLodopUpdate + document.documentElement.innerHTML
139
+ } else if (is64IE) document.write(strHtm64_Update); else if (isIE) document.write(strHtmUpdate); else {
140
+ document.documentElement.innerHTML = strHtmUpdate + document.documentElement.innerHTML
141
+ }
106
142
  return LODOP
107
- };
108
- // ===如下空白位置适合调用统一功能(如注册语句、语言选择等):===
143
+ }
144
+ ;
145
+ // ===如下空白位置适合调用统一功能(如注册语句、语言选择等):===
109
146
  LODOP.SET_LICENSES('西安奥枫软件有限公司', '552C41D5AB0D146FCF77D05CD8AA15A1', '', '')
110
- // ===========================================================
147
+ // ===========================================================
111
148
  return LODOP
112
- } catch (err) { alert('getLodop出错:' + err) };
149
+ } catch (err) {
150
+ alert('getLodop出错:' + err)
151
+ }
152
+ ;
113
153
  };
114
154
 
115
155
  export default getLodop
@@ -70,7 +70,10 @@
70
70
  <input class="input_search" style="width:60%" style="width:60%" type="number" v-model="maxmoney"
71
71
  v-scale="[maxmoney, 2]" placeholder='限购金额' disabled>
72
72
  </div>
73
- <div class="col-sm-4" v-if="!hasLimit">
73
+ <div class="col-sm-4" v-if="mingas > 0 ">
74
+ <label class="font_normal_body">&ensp;购气下限</label>
75
+ <input class="input_search" style="width:60%" style="width:60%" type="number" v-model="mingas"
76
+ v-scale="[mingas, 4]" placeholder='最低购气量' disabled>
74
77
  </div>
75
78
 
76
79
  <div class="col-sm-4"
@@ -302,7 +305,7 @@
302
305
  } else {
303
306
  self.model.f_pregas = (self.model.f_pregas - 0).toFixed(0)
304
307
  }
305
- if ((self.model.f_pregas - 0) - (self.maxgas - 0) <= 0) {
308
+ if ((self.model.f_pregas - 0) - (self.maxgas - 0) <= 0 || (self.model.f_pregas - 0) - (self.mingas - 0) >= 0) {
306
309
  self.model.f_meter_type = self.row.f_meter_type
307
310
  let getAmount = await self.$CommonService.gasCalculate(self.model, self.model.f_pregas)
308
311
  self.model.getDeduct = 0
@@ -454,7 +457,7 @@
454
457
  self.model.f_use_type = self.config.billType
455
458
  self.model.f_bill_type = self.model.f_print
456
459
  self.hasValidateBill = self.config.hasBillManage
457
-
460
+ self.mingas = self.config.MinSellGas
458
461
  // 判断限购
459
462
  let limit_param = {
460
463
  f_userinfo_id: self.row.f_userinfo_id,
@@ -525,6 +528,7 @@
525
528
  quickSale: false,
526
529
  showupload: true, // 显示上传
527
530
  hasPrint: true, // 默认打票
531
+ MinSellGas: 0,
528
532
  hasBillManage: false, // 默认不启用发票管理
529
533
  taxforidnumber: true, // 身份证号同步到纳税人识别号
530
534
  billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
@@ -533,6 +537,7 @@
533
537
  floor: false,
534
538
  overdraftBalance: false // 是否支持系统余额透支
535
539
  },
540
+ mingas: 0,
536
541
  eticket_msg: false,
537
542
  eticket_show: false,
538
543
  invoice_is_pax: '不征税',
@@ -790,6 +795,8 @@
790
795
  if ((this.row.f_topup_ceil - 0) > 0 && (this.model.f_pregas - 0) > (this.row.f_topup_ceil - 0)) {
791
796
  this.$showAlert(`您输入的气量不能大于该表的充值上限: ${this.row.f_topup_ceil}`, 'warning', 5000)
792
797
  this.model.f_pregas = null
798
+ } else if ((this.model.f_pregas - 0) - (this.mingas - 0) < 0) {
799
+ this.$showAlert(`注意:购气量最少为:${this.mingas}m³`, 'warning', 3000)
793
800
  } else {
794
801
  pregasGen(this)
795
802
  if (this.config.quickSale) {
@@ -68,7 +68,10 @@
68
68
  <input class="input_search" style="width:60%" style="width:60%" type="number" v-model="maxmoney"
69
69
  v-scale="[maxmoney, 2]" placeholder='限购金额' disabled>
70
70
  </div>
71
- <div class="col-sm-4" v-if="!hasLimit">
71
+ <div class="col-sm-4" v-if="mingas > 0 ">
72
+ <label class="font_normal_body">&ensp;购气下限</label>
73
+ <input class="input_search" style="width:60%" style="width:60%" type="number" v-model="mingas"
74
+ v-scale="[mingas, 4]" placeholder='最低购气量' disabled>
72
75
  </div>
73
76
 
74
77
  <div class="col-sm-4"
@@ -272,7 +275,7 @@
272
275
  } else {
273
276
  self.model.f_pregas = (self.model.f_pregas - 0).toFixed(0)
274
277
  }
275
- if ((self.model.f_pregas - 0) - (self.maxgas - 0) <= 0) {
278
+ if ((self.model.f_pregas - 0) - (self.maxgas - 0) <= 0 || (self.model.f_pregas - 0) - (self.mingas - 0) >= 0) {
276
279
  self.model.f_meter_type = self.row.f_meter_type
277
280
  let getAmount = await self.$CommonService.gasCalculate(self.model, self.model.f_pregas)
278
281
  self.model.f_preamount = getAmount.data.chargenum
@@ -295,7 +298,6 @@
295
298
  let sellgasGen = async function (self) {
296
299
  try {
297
300
  self.row.cardInfo = self.cardData
298
-
299
301
  if (self.paymentModel.length === 0) {
300
302
  self.paymentModel = [{
301
303
  f_payment: self.model.f_payment[0],
@@ -307,7 +309,6 @@
307
309
  self.model.xiekamoney = (self.model.f_pregas * self.model.chargeprice[0].f_price)
308
310
  self.model.xiekamoney = self.model.xiekamoney.toFixed(4)
309
311
  }
310
-
311
312
  self.model.payments = self.paymentModel
312
313
  // 加入扫码盒付款码支付流水号
313
314
  self.model.f_serial_id = self.$refs.paymentcode.paymentCodeReturnData.f_out_trade_no
@@ -380,38 +381,37 @@
380
381
 
381
382
  let asyncCardMeterCenter = async function (self) {
382
383
  await self.$getConfig(self, 'CardMeterCenter')
383
- console.log('卡表收费config', self.config)
384
-
384
+ console.log('卡表收费1config', self.config)
385
385
  // 添加 “系统余额透支” 付款方式
386
386
  let i = -1
387
387
  for (const index in self.paytype) {
388
- if (self.paytype[index].value == "系统余额透支"){
388
+ if (self.paytype[index].value == '系统余额透支') {
389
389
  i = index
390
390
  break
391
391
  }
392
392
  }
393
- if (self.canOverdraftBalance()){
394
- if (i == -1){
393
+ if (self.canOverdraftBalance()) {
394
+ if (i == -1) {
395
395
  self.paytype.push({
396
- label: "系统余额透支",
397
- value: "系统余额透支"
396
+ label: '系统余额透支',
397
+ value: '系统余额透支'
398
398
  })
399
399
  }
400
- }else {
401
- if (i != -1){
400
+ } else {
401
+ if (i != -1) {
402
402
  self.paytype.splice(i, 1)
403
403
  }
404
404
  }
405
-
406
405
  // 默认打印格式
407
406
  self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
408
407
  self.model.f_payment = [self.config.payment]
409
408
  self.mulPrint = self.config.printType instanceof Array
410
-
411
409
  // 获取当前票号用
412
410
  self.model.f_use_type = self.config.billType
413
411
  self.model.f_bill_type = self.model.f_print
414
412
  self.hasValidateBill = self.config.hasBillManage
413
+ self.mingas = self.config.MinSellGas
414
+ console.log('获取最小购气量', self.mingas)
415
415
 
416
416
  // 判断限购
417
417
  let limit_param = {
@@ -480,6 +480,7 @@
480
480
  autoCollection: true, // 自动填写收款
481
481
  showupload: true, // 显示上传
482
482
  hasPrint: true, // 默认打票
483
+ MinSellGas: 0,
483
484
  hasBillManage: false, // 默认不启用发票管理
484
485
  billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
485
486
  printType: '普通收据', // 收据/电子票/专用发票/国税发票
@@ -487,6 +488,7 @@
487
488
  floor: false,
488
489
  overdraftBalance: false // 是否支持系统余额透支
489
490
  },
491
+ mingas: 0,
490
492
  eticket_msg: false,
491
493
  eticket_show: false,
492
494
  invoice_is_pax: '不征税',
@@ -541,6 +543,7 @@
541
543
  },
542
544
  props: ['row', 'cardData'],
543
545
  async ready () {
546
+ console.log('看看走不走这个', this.authArr)
544
547
  if (this.authArr.includes('余额写卡限定')) {
545
548
  this.paytype = [{label: '余额写卡', value: '余额写卡'}]
546
549
  } else {
@@ -561,7 +564,7 @@
561
564
  this.model.f_preamount = ''
562
565
  this.model.f_pregas = 0
563
566
  }
564
- this.$els.fpregas.focus()
567
+ // this.$els.fpregas.focus()
565
568
  asyncCardMeterCenter(this)
566
569
  },
567
570
  watch: {
@@ -712,6 +715,8 @@
712
715
  if ((this.row.f_topup_ceil - 0) > 0 && (this.model.f_pregas - 0) > (this.row.f_topup_ceil - 0)) {
713
716
  this.$showAlert(`您输入的气量不能大于该表的充值上限: ${this.row.f_topup_ceil}`, 'warning', 5000)
714
717
  this.model.f_pregas = null
718
+ } else if ((this.model.f_pregas - 0) - (this.mingas - 0) < 0) {
719
+ this.$showAlert(`注意:购气量最少为:${this.mingas}m³`, 'warning', 3000)
715
720
  } else {
716
721
  pregasGen(this)
717
722
  }