yunlin 1.0.0 → 1.0.1
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/README.md +0 -0
- package/dist/index.js +1 -0
- package/package.json +15 -4
- package/index.js +0 -276
package/README.md
ADDED
|
File without changes
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a0_0x4687a6=a0_0x11f8;(function(_0x109233,_0x28d81b){const _0x5293c1=a0_0x11f8,_0x217330=_0x109233();while(!![]){try{const _0x5ccfa5=-parseInt(_0x5293c1(0xf4))/0x1*(parseInt(_0x5293c1(0xe9))/0x2)+-parseInt(_0x5293c1(0xea))/0x3*(parseInt(_0x5293c1(0x10e))/0x4)+-parseInt(_0x5293c1(0x118))/0x5+parseInt(_0x5293c1(0xfe))/0x6*(-parseInt(_0x5293c1(0xfb))/0x7)+-parseInt(_0x5293c1(0x127))/0x8+-parseInt(_0x5293c1(0xeb))/0x9+parseInt(_0x5293c1(0x123))/0xa;if(_0x5ccfa5===_0x28d81b)break;else _0x217330['push'](_0x217330['shift']());}catch(_0x3c0914){_0x217330['push'](_0x217330['shift']());}}}(a0_0x936e,0x1a136));function a0_0x11f8(_0x54b3ad,_0x2ace1f){const _0x936e8a=a0_0x936e();return a0_0x11f8=function(_0x11f87d,_0x27852f){_0x11f87d=_0x11f87d-0xe0;let _0x436b74=_0x936e8a[_0x11f87d];return _0x436b74;},a0_0x11f8(_0x54b3ad,_0x2ace1f);}function fmtNum(_0x1ba967){const _0x22d07b=a0_0x11f8;if(_0x1ba967==0x0)return'0';if(!_0x1ba967)return'';let _0x2b7614=typeof _0x1ba967===_0x22d07b(0x122)?parseFloat(_0x1ba967):_0x1ba967;if(isNaN(_0x2b7614))return'';return _0x2b7614[_0x22d07b(0x104)](_0x22d07b(0xec),{'minimumFractionDigits':0x0,'maximumFractionDigits':0x2});}function handleCosting(_0x47154d,_0x5e429f='',_0x2a4814={'people':a0_0x4687a6(0x115),'service':a0_0x4687a6(0x128),'trip':a0_0x4687a6(0x102),'other':a0_0x4687a6(0x100),'reduction':a0_0x4687a6(0xef),'totalprice':'總計','airtax':a0_0x4687a6(0x105)},_0x12c884={'adult':'成人','child':'兒童','childusebed':a0_0x4687a6(0xfd),'infant':'嬰兒','half':'拼房','tip':'小費','elder':a0_0x4687a6(0x10d),'vip':'會員減免','promotion':'促銷','insure':a0_0x4687a6(0xf7),'coupon':a0_0x4687a6(0xe1),'point':'積分','tax':'稅金','viprecharge':a0_0x4687a6(0x119),'r':'人','t':'天'}){const _0x26e5ad=a0_0x4687a6;let _0x2ecf95=[];const _0x243d87=_0x26e5ad(0xe3),_0x15477d=_0x47154d[_0x26e5ad(0xe0)](_0x32f7ed=>_0x32f7ed['strLx']==_0x26e5ad(0x112));if(_0x15477d[_0x26e5ad(0xf6)]){let _0x2212d5={'title':_0x2a4814[_0x26e5ad(0x101)],'type':'base','list':[]};_0x15477d[_0x26e5ad(0xfc)](_0x54b091=>{const _0x57bc5d=_0x26e5ad;_0x2212d5[_0x57bc5d(0x11f)][_0x57bc5d(0xf2)]({'title':_0x12c884[_0x54b091[_0x57bc5d(0x107)]],'info':_0x5e429f+_0x54b091[_0x57bc5d(0xf0)]+_0x243d87+_0x54b091[_0x57bc5d(0xee)],'nRs':_0x54b091['nRs'],'unit':_0x54b091[_0x57bc5d(0xf0)],'cb':_0x54b091[_0x57bc5d(0x10b)],'type':_0x57bc5d(0x112)});}),_0x2ecf95['push'](_0x2212d5);}const _0x29fe3e=_0x47154d[_0x26e5ad(0xe0)](_0x324f9e=>_0x324f9e['strLx']==_0x26e5ad(0x11d));if(_0x29fe3e[_0x26e5ad(0xf6)]){let _0x49b7fd={'title':_0x2a4814[_0x26e5ad(0x11d)],'type':'service','list':[]};_0x29fe3e[_0x26e5ad(0xfc)](_0xb838f1=>{const _0x391bbb=_0x26e5ad;_0x49b7fd[_0x391bbb(0x11f)][_0x391bbb(0xf2)]({'title':_0xb838f1['name']+('['+_0xb838f1[_0x391bbb(0x120)]+']'),'info':_0x5e429f+_0xb838f1[_0x391bbb(0xf8)]+_0x243d87+_0xb838f1[_0x391bbb(0xe5)],'nRs':_0xb838f1['num'],'unit':_0xb838f1[_0x391bbb(0xf8)],'cb':_0xb838f1[_0x391bbb(0x121)],'type':_0x391bbb(0x11d)});}),_0x2ecf95['push'](_0x49b7fd);}const _0x5f249b=_0x47154d[_0x26e5ad(0xe0)](_0xabf281=>_0xabf281[_0x26e5ad(0x103)]==_0x26e5ad(0x10c));if(_0x5f249b[_0x26e5ad(0xf6)]){let _0x38a446={'title':_0x2a4814[_0x26e5ad(0x10c)],'type':_0x26e5ad(0x10c),'list':[]};_0x5f249b[_0x26e5ad(0xfc)](_0x3f1509=>{const _0x311509=_0x26e5ad;_0x3f1509['adultnum']!='0'&&_0x38a446[_0x311509(0x11f)][_0x311509(0xf2)]({'title':_0x3f1509['name']+('['+_0x12c884[_0x311509(0xe8)]+']'),'info':_0x5e429f+_0x3f1509['adultprice']+_0x243d87+_0x3f1509['adultnum'],'nRs':_0x3f1509[_0x311509(0x116)],'unit':_0x3f1509[_0x311509(0x113)],'cb':_0x3f1509['baseadultprice'],'type':_0x311509(0x10c)}),_0x3f1509[_0x311509(0xff)]!='0'&&_0x38a446['list']['push']({'title':_0x3f1509[_0x311509(0xe6)]+('['+_0x12c884['child']+']'),'info':_0x5e429f+_0x3f1509['childprice']+_0x243d87+_0x3f1509[_0x311509(0xff)],'nRs':_0x3f1509['childnum'],'unit':_0x3f1509['childprice'],'cb':_0x3f1509[_0x311509(0x125)],'type':'trip'});}),_0x2ecf95[_0x26e5ad(0xf2)](_0x38a446);}let _0x1f8dc8=[];const _0x4a4644=_0x47154d[_0x26e5ad(0xe0)](_0x4a4b35=>_0x4a4b35['strLx']==_0x26e5ad(0x111));_0x4a4644[_0x26e5ad(0xf6)]&&_0x4a4644[_0x26e5ad(0xfc)](_0xb1eb8a=>{const _0x22ce98=_0x26e5ad,_0x5c0b20=_0xb1eb8a['name'][_0x22ce98(0xf5)]('|')||[''];_0x1f8dc8['push']({'title':_0x12c884[_0x22ce98(0x111)]+('['+_0x5c0b20[0x0]+']'),'info':_0x5e429f+_0xb1eb8a[_0x22ce98(0x109)],'unit':_0xb1eb8a[_0x22ce98(0x109)],'cb':_0xb1eb8a['money'],'type':_0x22ce98(0x111)});});const _0x485a72=_0x47154d[_0x26e5ad(0xe0)](_0xd87882=>_0xd87882[_0x26e5ad(0x103)]==_0x26e5ad(0x117));_0x485a72[_0x26e5ad(0xf6)]&&_0x485a72[_0x26e5ad(0xfc)](_0x11bb57=>{const _0x3a3013=_0x26e5ad;_0x1f8dc8[_0x3a3013(0xf2)]({'title':_0x12c884[_0x3a3013(0x10f)]+('['+_0x11bb57[_0x3a3013(0xe6)]+']'),'info':_0x5e429f+_0x11bb57['money'],'unit':_0x11bb57[_0x3a3013(0x109)],'cb':_0x11bb57[_0x3a3013(0x109)],'type':'vip'});});const _0x5a24bd=_0x47154d[_0x26e5ad(0xe0)](_0x2da342=>_0x2da342['strLx']==_0x26e5ad(0x110));_0x5a24bd[_0x26e5ad(0xf6)]&&_0x5a24bd['map'](_0xbdde0b=>{const _0x185ceb=_0x26e5ad;_0x1f8dc8['push']({'title':_0x12c884['promotion'],'info':_0x5e429f+_0xbdde0b[_0x185ceb(0x109)],'unit':_0xbdde0b['money'],'cb':_0xbdde0b['money'],'type':_0x185ceb(0x110)});});_0x1f8dc8[_0x26e5ad(0xf6)]&&_0x2ecf95[_0x26e5ad(0xf2)]({'title':_0x2a4814[_0x26e5ad(0xe2)],'type':_0x26e5ad(0xe2),'list':_0x1f8dc8});const _0x1a4b07=_0x47154d['filter'](_0x29139b=>_0x29139b[_0x26e5ad(0x103)]==_0x26e5ad(0xf9));if(_0x1a4b07['length']){let _0x401341={'title':_0x2a4814[_0x26e5ad(0xf9)],'type':_0x26e5ad(0xf9),'list':[]};_0x1a4b07[_0x26e5ad(0xfc)](_0x313b1b=>{const _0x5c960c=_0x26e5ad;_0x401341['list'][_0x5c960c(0xf2)]({'title':_0x12c884[_0x313b1b['rylx']],'info':_0x5e429f+_0x313b1b[_0x5c960c(0xf8)]+_0x243d87+_0x313b1b['sl'],'nRs':_0x313b1b['sl'],'unit':_0x313b1b[_0x5c960c(0xf8)],'cb':_0x313b1b[_0x5c960c(0xf1)],'type':_0x313b1b[_0x5c960c(0xed)]});}),_0x2ecf95[_0x26e5ad(0xf2)](_0x401341);}const _0x3fa490=[_0x26e5ad(0x112),_0x26e5ad(0x11d),_0x26e5ad(0x10c),_0x26e5ad(0x111),_0x26e5ad(0x117),_0x26e5ad(0x110),_0x26e5ad(0xf9)],_0x325fd9=_0x47154d[_0x26e5ad(0xe0)](_0x4f8981=>!_0x3fa490['includes'](_0x4f8981[_0x26e5ad(0x103)]));let _0x38eb1a={'title':_0x2a4814[_0x26e5ad(0x11e)],'type':'other','list':[]};for(var _0x344eb4=0x0;_0x344eb4<_0x325fd9[_0x26e5ad(0xf6)];_0x344eb4++){const _0x435b02=_0x325fd9[_0x344eb4];_0x435b02[_0x26e5ad(0x103)]==_0x26e5ad(0x106)&&_0x38eb1a[_0x26e5ad(0x11f)][_0x26e5ad(0xf2)]({'title':_0x12c884[_0x26e5ad(0x106)]+('['+_0x435b02[_0x26e5ad(0xe6)]+']'),'info':_0x5e429f+_0x435b02['money'],'unit':_0x435b02['money'],'type':_0x435b02[_0x26e5ad(0x103)]}),_0x435b02['strLx']=='insure'&&_0x38eb1a[_0x26e5ad(0x11f)][_0x26e5ad(0xf2)]({'title':_0x12c884[_0x26e5ad(0xfa)]+('['+_0x435b02[_0x26e5ad(0xe6)]+']'),'info':_0x5e429f+_0x435b02[_0x26e5ad(0x11a)]+_0x243d87+_0x435b02[_0x26e5ad(0xf3)]+_0x12c884['r'],'nRs':_0x435b02[_0x26e5ad(0xf3)],'unit':_0x435b02[_0x26e5ad(0x11a)],'cb':_0x435b02[_0x26e5ad(0x11a)],'type':'insure'}),(_0x435b02[_0x26e5ad(0x103)]==_0x26e5ad(0x124)||_0x435b02[_0x26e5ad(0x103)]==_0x26e5ad(0x108))&&_0x38eb1a['list'][_0x26e5ad(0xf2)]({'title':_0x12c884[_0x435b02['strLx']],'info':_0x5e429f+_0x435b02[_0x26e5ad(0x109)],'unit':_0x435b02[_0x26e5ad(0x109)],'type':_0x435b02[_0x26e5ad(0x103)]}),_0x435b02['strLx']==_0x26e5ad(0x114)&&_0x38eb1a[_0x26e5ad(0x11f)][_0x26e5ad(0xf2)]({'title':_0x12c884[_0x435b02[_0x26e5ad(0x103)]],'info':_0x5e429f+_0x435b02['tip']+_0x243d87+_0x435b02[_0x26e5ad(0x11b)]+_0x12c884['r']+_0x243d87+_0x435b02[_0x26e5ad(0x11c)]+_0x12c884['t'],'nRs':_0x435b02[_0x26e5ad(0x11b)],'count':_0x435b02[_0x26e5ad(0x11c)],'unit':_0x435b02['tip'],'type':_0x435b02['strLx']}),_0x435b02[_0x26e5ad(0x103)]==_0x26e5ad(0x126)&&_0x38eb1a[_0x26e5ad(0x11f)]['push']({'title':_0x12c884[_0x435b02['strLx']],'info':_0x5e429f+_0x435b02[_0x26e5ad(0x10a)],'unit':_0x435b02[_0x26e5ad(0x10a)],'type':_0x435b02['strLx']});}_0x38eb1a[_0x26e5ad(0x11f)][_0x26e5ad(0xf6)]&&_0x2ecf95[_0x26e5ad(0xf2)](_0x38eb1a);const _0x576ec9=_0x47154d[_0x26e5ad(0xe0)](_0xed4b3c=>_0xed4b3c[_0x26e5ad(0x103)]==_0x26e5ad(0xe7));return _0x576ec9[_0x26e5ad(0xf6)]&&_0x2ecf95[_0x26e5ad(0xf2)]({'title':_0x2a4814[_0x26e5ad(0xe7)],'type':_0x26e5ad(0xe7),'list':[{'title':_0x2a4814['totalprice'],'info':_0x5e429f+_0x576ec9[0x0][_0x26e5ad(0xe4)]}]}),_0x2ecf95;}function a0_0x936e(){const _0x3d9bac=['filter','優惠券','reduction','\x20*\x20','price','num','name','totalprice','adult','1158xEMQRR','12609BpOLxj','1593036hyxmyN','en-US','rylx','nRs','減免費用','fLsjUnit','unitpricewb','push','users','359RMknsA','split','length','保險費用','unitprice','airtax','insure','9366ylqDyL','map','兒童[占床]','834Etrasa','childnum','其他費用','people','附加行程','strLx','toLocaleString','機場稅','viprecharge','strJgbm','point','money','totaltax','fJcbzlsjUnit','trip','長者減免','40XrVngg','vip','promotion','elder','base','adultprice','tip','人員費用','adultnum','vipdiscounted','124970Ohyqjr','會員充值','unit','tipuser','tipday','service','other','list','itemname','baseprice','string','9466240mHsCiD','coupon','basechildprice','tax','1615576kslnyc','附加服務'];a0_0x936e=function(){return _0x3d9bac;};return a0_0x936e();}module['exports']={'showLog':showLog,'handleCosting':handleCosting};
|
package/package.json
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yunlin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
6
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
7
|
+
"build": "babel src --out-dir dist && javascript-obfuscator dist --output dist"
|
|
7
8
|
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
8
12
|
"keywords": [],
|
|
9
13
|
"author": "",
|
|
10
|
-
"license": "ISC"
|
|
11
|
-
|
|
14
|
+
"license": "ISC",
|
|
15
|
+
"description": "",
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@babel/cli": "^7.25.9",
|
|
18
|
+
"@babel/core": "^7.26.0",
|
|
19
|
+
"@babel/preset-env": "^7.26.0",
|
|
20
|
+
"javascript-obfuscator": "^4.1.1"
|
|
21
|
+
}
|
|
22
|
+
}
|
package/index.js
DELETED
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
function showLog(title = '看看我啊') {
|
|
2
|
-
console.log(title);
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* 计价数据格式处理
|
|
7
|
-
* @param {Object} valList 价格数据数组
|
|
8
|
-
* @param {Object} hbfh 货币符号
|
|
9
|
-
* @param {Object} title 自定义标题
|
|
10
|
-
*/
|
|
11
|
-
function handleCosting(valList, hbfh = '', titles = {
|
|
12
|
-
people: '人員費用',
|
|
13
|
-
service: '附加服務',
|
|
14
|
-
trip: '附加行程',
|
|
15
|
-
other: '其他費用',
|
|
16
|
-
reduction: '減免費用',
|
|
17
|
-
totalprice: '總計',
|
|
18
|
-
airtax: '機場稅',
|
|
19
|
-
}, keys = {
|
|
20
|
-
//键名对应 数据返回键名对应显示标题 与其他拓展
|
|
21
|
-
adult: '成人',
|
|
22
|
-
child: '兒童',
|
|
23
|
-
childusebed: '兒童[占床]',
|
|
24
|
-
infant: '嬰兒',
|
|
25
|
-
half: '拼房',
|
|
26
|
-
//其他拓展
|
|
27
|
-
tip: '小費',
|
|
28
|
-
elder: '長者減免',
|
|
29
|
-
vip: '會員減免',
|
|
30
|
-
promotion: '促銷',
|
|
31
|
-
insure: '保險費用',
|
|
32
|
-
coupon: '優惠券',
|
|
33
|
-
point: '積分',
|
|
34
|
-
tax: '稅金',
|
|
35
|
-
viprecharge: '會員充值',
|
|
36
|
-
r: '人',
|
|
37
|
-
t: '天',
|
|
38
|
-
}) {
|
|
39
|
-
let list = []
|
|
40
|
-
const rideIcon = ' * '
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
//取出人员明细
|
|
44
|
-
const peopleList = valList.filter(item => item.strLx == 'base')
|
|
45
|
-
if (peopleList.length) {
|
|
46
|
-
let val = {
|
|
47
|
-
title: titles['people'],
|
|
48
|
-
type: 'base',
|
|
49
|
-
list: []
|
|
50
|
-
}
|
|
51
|
-
peopleList.map(item => {
|
|
52
|
-
val.list.push({
|
|
53
|
-
title: keys[item.strJgbm], //标题
|
|
54
|
-
info: hbfh + item.fLsjUnit + rideIcon + item.nRs, //描述
|
|
55
|
-
nRs: item.nRs, //人数
|
|
56
|
-
unit: item.fLsjUnit, //单价
|
|
57
|
-
cb: item.fJcbzlsjUnit, //成本
|
|
58
|
-
type: 'base'
|
|
59
|
-
})
|
|
60
|
-
})
|
|
61
|
-
list.push(val)
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
//附加服务
|
|
65
|
-
const serviceList = valList.filter(item => item.strLx == 'service')
|
|
66
|
-
if (serviceList.length) {
|
|
67
|
-
let val = {
|
|
68
|
-
title: titles['service'],
|
|
69
|
-
type: 'service',
|
|
70
|
-
list: []
|
|
71
|
-
}
|
|
72
|
-
serviceList.map(item => {
|
|
73
|
-
val.list.push({
|
|
74
|
-
title: item.name + `[${item.itemname}]`, //标题
|
|
75
|
-
info: hbfh + item.unitprice + rideIcon + item.num, //描述
|
|
76
|
-
nRs: item.num, //人数
|
|
77
|
-
unit: item.unitprice, //单价
|
|
78
|
-
cb: item.baseprice, //成本
|
|
79
|
-
type: 'service'
|
|
80
|
-
})
|
|
81
|
-
})
|
|
82
|
-
list.push(val)
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
//附加行程
|
|
86
|
-
const tripList = valList.filter(item => item.strLx == 'trip')
|
|
87
|
-
if (tripList.length) {
|
|
88
|
-
let val = {
|
|
89
|
-
title: titles['trip'],
|
|
90
|
-
type: 'trip',
|
|
91
|
-
list: []
|
|
92
|
-
}
|
|
93
|
-
tripList.map(item => {
|
|
94
|
-
if (item.adultnum != '0') {
|
|
95
|
-
val.list.push({
|
|
96
|
-
title: item.name + `[${keys['adult']}]`, //成人
|
|
97
|
-
info: hbfh + item.adultprice + rideIcon + item.adultnum, //描述
|
|
98
|
-
nRs: item.adultnum, //人数
|
|
99
|
-
unit: item.adultprice, //单价
|
|
100
|
-
cb: item.baseadultprice, //成本
|
|
101
|
-
type: 'trip'
|
|
102
|
-
})
|
|
103
|
-
}
|
|
104
|
-
if (item.childnum != '0') {
|
|
105
|
-
val.list.push({
|
|
106
|
-
title: item.name + `[${keys['child']}]`, //儿童
|
|
107
|
-
info: hbfh + item.childprice + rideIcon + item.childnum, //描述
|
|
108
|
-
nRs: item.childnum, //人数
|
|
109
|
-
unit: item.childprice, //单价
|
|
110
|
-
cb: item.basechildprice, //成本
|
|
111
|
-
type: 'trip'
|
|
112
|
-
})
|
|
113
|
-
}
|
|
114
|
-
})
|
|
115
|
-
list.push(val)
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
let reductionList = []
|
|
119
|
-
//长者减免
|
|
120
|
-
const elderList = valList.filter(item => item.strLx == 'elder')
|
|
121
|
-
if (elderList.length) {
|
|
122
|
-
elderList.map(item => {
|
|
123
|
-
const parts = item.name.split("|") || [''];
|
|
124
|
-
reductionList.push({
|
|
125
|
-
title: keys['elder'] + `[${parts[0]}]`,
|
|
126
|
-
info: hbfh + item.money, //描述
|
|
127
|
-
unit: item.money, //单价
|
|
128
|
-
cb: item.money, //成本
|
|
129
|
-
type: 'elder'
|
|
130
|
-
})
|
|
131
|
-
})
|
|
132
|
-
}
|
|
133
|
-
//会员减免
|
|
134
|
-
const vipList = valList.filter(item => item.strLx == 'vipdiscounted')
|
|
135
|
-
if (vipList.length) {
|
|
136
|
-
vipList.map(item => {
|
|
137
|
-
reductionList.push({
|
|
138
|
-
title: keys['vip'] + `[${item.name}]`,
|
|
139
|
-
info: hbfh + item.money, //描述
|
|
140
|
-
unit: item.money, //单价
|
|
141
|
-
cb: item.money, //成本
|
|
142
|
-
type: 'vip'
|
|
143
|
-
})
|
|
144
|
-
})
|
|
145
|
-
}
|
|
146
|
-
//促销
|
|
147
|
-
const promotionList = valList.filter(item => item.strLx == 'promotion')
|
|
148
|
-
if (promotionList.length) {
|
|
149
|
-
promotionList.map(item => {
|
|
150
|
-
reductionList.push({
|
|
151
|
-
title: keys['promotion'],
|
|
152
|
-
info: hbfh + item.money, //描述
|
|
153
|
-
unit: item.money, //单价
|
|
154
|
-
cb: item.money, //成本
|
|
155
|
-
type: 'promotion'
|
|
156
|
-
})
|
|
157
|
-
})
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
//减免或促销费用
|
|
161
|
-
if (reductionList.length) {
|
|
162
|
-
list.push({
|
|
163
|
-
title: titles['reduction'],
|
|
164
|
-
type: 'reduction',
|
|
165
|
-
list: reductionList
|
|
166
|
-
})
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
//机场税
|
|
170
|
-
const airtaxList = valList.filter(item => item.strLx == 'airtax')
|
|
171
|
-
if (airtaxList.length) {
|
|
172
|
-
let val = {
|
|
173
|
-
title: titles['airtax'],
|
|
174
|
-
type: 'airtax',
|
|
175
|
-
list: []
|
|
176
|
-
}
|
|
177
|
-
airtaxList.map(item => {
|
|
178
|
-
val.list.push({
|
|
179
|
-
title: keys[item.rylx], //标题
|
|
180
|
-
info: hbfh + item.unitprice + rideIcon + item.sl, //描述
|
|
181
|
-
nRs: item.sl, //人数
|
|
182
|
-
unit: item.unitprice, //单价
|
|
183
|
-
cb: item.unitpricewb, //其他币种
|
|
184
|
-
type: item.rylx
|
|
185
|
-
})
|
|
186
|
-
})
|
|
187
|
-
list.push(val)
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
const listKey = ['base', 'service', 'trip', 'elder', 'vipdiscounted', 'promotion', 'airtax'] //数据格式参数
|
|
191
|
-
//取出其他信息
|
|
192
|
-
const otherList = valList.filter(item => !listKey.includes(item.strLx));
|
|
193
|
-
|
|
194
|
-
let otherVal = {
|
|
195
|
-
title: titles['other'],
|
|
196
|
-
type: 'other',
|
|
197
|
-
list: []
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
for (var i = 0; i < otherList.length; i++) {
|
|
201
|
-
const item = otherList[i]
|
|
202
|
-
//会员充值
|
|
203
|
-
if (item.strLx == 'viprecharge') {
|
|
204
|
-
otherVal.list.push({
|
|
205
|
-
title: keys['viprecharge'] + `[${item.name}]`,
|
|
206
|
-
info: hbfh + item.money,
|
|
207
|
-
unit: item.money, //单价
|
|
208
|
-
type: item.strLx
|
|
209
|
-
})
|
|
210
|
-
}
|
|
211
|
-
//保险
|
|
212
|
-
if (item.strLx == 'insure') {
|
|
213
|
-
otherVal.list.push({
|
|
214
|
-
title: keys['insure'] + `[${item.name}]`,
|
|
215
|
-
info: hbfh + item.unit + rideIcon + item.users + keys['r'], //描述
|
|
216
|
-
nRs: item.users, //人数
|
|
217
|
-
unit: item.unit, //单价
|
|
218
|
-
cb: item.unit, //成本
|
|
219
|
-
type: 'insure'
|
|
220
|
-
})
|
|
221
|
-
}
|
|
222
|
-
//优惠券-积分
|
|
223
|
-
if (item.strLx == 'coupon' || item.strLx == 'point') {
|
|
224
|
-
otherVal.list.push({
|
|
225
|
-
title: keys[item.strLx],
|
|
226
|
-
info: hbfh + item.money,
|
|
227
|
-
unit: item.money, //单价
|
|
228
|
-
type: item.strLx
|
|
229
|
-
})
|
|
230
|
-
}
|
|
231
|
-
//小费
|
|
232
|
-
if (item.strLx == 'tip') {
|
|
233
|
-
otherVal.list.push({
|
|
234
|
-
title: keys[item.strLx], //标题
|
|
235
|
-
info: hbfh + item.tip + rideIcon + item.tipuser + keys['r'] + rideIcon + item.tipday +
|
|
236
|
-
keys['t'], //描述
|
|
237
|
-
nRs: item.tipuser, //人数
|
|
238
|
-
count: item.tipday, //天数,数量等
|
|
239
|
-
unit: item.tip, //单价
|
|
240
|
-
type: item.strLx //类型
|
|
241
|
-
})
|
|
242
|
-
}
|
|
243
|
-
//税
|
|
244
|
-
if (item.strLx == 'tax') {
|
|
245
|
-
otherVal.list.push({
|
|
246
|
-
title: keys[item.strLx],
|
|
247
|
-
info: hbfh + item.totaltax,
|
|
248
|
-
unit: item.totaltax,
|
|
249
|
-
type: item.strLx
|
|
250
|
-
})
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
if (otherVal.list.length) {
|
|
254
|
-
list.push(otherVal)
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
const totalprice = valList.filter(item => item.strLx == 'totalprice')
|
|
258
|
-
//总价(实付价格)
|
|
259
|
-
if (totalprice.length) {
|
|
260
|
-
list.push({
|
|
261
|
-
title: titles['totalprice'],
|
|
262
|
-
type: 'totalprice',
|
|
263
|
-
list: [{
|
|
264
|
-
title: titles['totalprice'],
|
|
265
|
-
info: hbfh + totalprice[0].price
|
|
266
|
-
}]
|
|
267
|
-
})
|
|
268
|
-
}
|
|
269
|
-
return list
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
module.exports = {
|
|
274
|
-
showLog,
|
|
275
|
-
handleCosting
|
|
276
|
-
};
|