Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
SuperMan
Commits
3d5c8dfb
Commit
3d5c8dfb
authored
Mar 28, 2019
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
c4934d08
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
283 additions
and
35 deletions
+283
-35
commonUtils.js
src/assets/utils/commonUtils.js
+171
-30
HotelManagement.vue
src/components/Hotel/HotelManagement.vue
+1
-1
HotelProductManage2.vue
src/components/Hotel/HotelProductManage2.vue
+2
-0
HotelSalesBoard.vue
src/components/Hotel/HotelSalesBoard.vue
+56
-2
HotelTotalStock.vue
src/components/Hotel/HotelTotalStock.vue
+52
-1
TravelControlList.vue
...components/TravelManager/TravelList/TravelControlList.vue
+1
-1
No files found.
src/assets/utils/commonUtils.js
View file @
3d5c8dfb
...
@@ -113,35 +113,176 @@ var commonUtils = {
...
@@ -113,35 +113,176 @@ var commonUtils = {
result
=
"刚刚"
;
result
=
"刚刚"
;
return
result
;
return
result
;
},
},
changeMoneyToChinese
(
n
)
{
// 数字转中文大写
changeMoneyToChinese
(
Num
)
{
// 数字转中文大写
var
fraction
=
[
'角'
,
'分'
];
if
(
!
Num
)
{
var
digit
=
[
return
'零'
'零'
,
'壹'
,
'贰'
,
'叁'
,
'肆'
,
'伍'
,
'陆'
,
'柒'
,
'捌'
,
'玖'
];
var
unit
=
[
[
'元'
,
'万'
,
'亿'
],
[
''
,
'拾'
,
'佰'
,
'仟'
]
];
var
head
=
n
<
0
?
'负'
:
''
;
n
=
Math
.
abs
(
n
);
var
s
=
''
;
for
(
var
i
=
0
;
i
<
fraction
.
length
;
i
++
)
{
s
+=
(
digit
[
Math
.
floor
(
n
*
10
*
Math
.
pow
(
10
,
i
))
%
10
]
+
fraction
[
i
]).
replace
(
/零./
,
''
);
}
}
s
=
s
||
'整'
;
var
isNegative
=
false
;
// 是否负数
n
=
Math
.
floor
(
n
);
if
(
Num
<
0
)
{
for
(
var
i
=
0
;
i
<
unit
[
0
].
length
&&
n
>
0
;
i
++
)
{
Num
=
-
Num
;
var
p
=
''
;
isNegative
=
true
;
for
(
var
j
=
0
;
j
<
unit
[
1
].
length
&&
n
>
0
;
j
++
)
{
}
p
=
digit
[
n
%
10
]
+
unit
[
1
][
j
]
+
p
;
if
(
typeof
Num
==
'number'
)
{
n
=
Math
.
floor
(
n
/
10
);
Num
=
Num
.
toString
();
}
for
(
var
i
=
Num
.
length
-
1
;
i
>=
0
;
i
--
)
{
Num
=
Num
.
replace
(
","
,
""
);
// 替换money中的“,”
Num
=
Num
.
replace
(
" "
,
""
);
// 替换money中的空格
}
Num
=
Num
.
replace
(
"¥"
,
""
);
// 替换掉可能出现的¥字符
if
(
isNaN
(
Num
))
{
// 验证输入的字符是否为数字
return
;
}
// ---字符处理完毕,开始转换,转换采用前后两部分分别转换---//
let
part
=
String
(
Num
).
split
(
"."
);
let
newchar
=
""
;
// 小数点前进行转化
for
(
var
i
=
part
[
0
].
length
-
1
;
i
>=
0
;
i
--
)
{
if
(
part
[
0
].
length
>
10
)
{
alertWarning
(
"位数过大,无法计算"
);
return
""
;
}
// 若数量超过拾亿单位,提示
let
tmpnewchar
=
""
;
let
perchar
=
part
[
0
].
charAt
(
i
);
switch
(
perchar
)
{
case
"0"
:
tmpnewchar
=
"零"
+
tmpnewchar
;
break
;
case
"1"
:
tmpnewchar
=
"壹"
+
tmpnewchar
;
break
;
case
"2"
:
tmpnewchar
=
"贰"
+
tmpnewchar
;
break
;
case
"3"
:
tmpnewchar
=
"叁"
+
tmpnewchar
;
break
;
case
"4"
:
tmpnewchar
=
"肆"
+
tmpnewchar
;
break
;
case
"5"
:
tmpnewchar
=
"伍"
+
tmpnewchar
;
break
;
case
"6"
:
tmpnewchar
=
"陆"
+
tmpnewchar
;
break
;
case
"7"
:
tmpnewchar
=
"柒"
+
tmpnewchar
;
break
;
case
"8"
:
tmpnewchar
=
"捌"
+
tmpnewchar
;
break
;
case
"9"
:
tmpnewchar
=
"玖"
+
tmpnewchar
;
break
;
}
switch
(
part
[
0
].
length
-
i
-
1
)
{
case
0
:
tmpnewchar
=
tmpnewchar
+
"元"
;
break
;
case
1
:
if
(
perchar
!=
0
)
tmpnewchar
=
tmpnewchar
+
"拾"
;
break
;
case
2
:
if
(
perchar
!=
0
)
tmpnewchar
=
tmpnewchar
+
"佰"
;
break
;
case
3
:
if
(
perchar
!=
0
)
tmpnewchar
=
tmpnewchar
+
"仟"
;
break
;
case
4
:
tmpnewchar
=
tmpnewchar
+
"万"
;
break
;
case
5
:
if
(
perchar
!=
0
)
tmpnewchar
=
tmpnewchar
+
"拾"
;
break
;
case
6
:
if
(
perchar
!=
0
)
tmpnewchar
=
tmpnewchar
+
"佰"
;
break
;
case
7
:
if
(
perchar
!=
0
)
tmpnewchar
=
tmpnewchar
+
"仟"
;
break
;
case
8
:
tmpnewchar
=
tmpnewchar
+
"亿"
;
break
;
case
9
:
tmpnewchar
=
tmpnewchar
+
"拾"
;
break
;
}
newchar
=
tmpnewchar
+
newchar
;
}
// 小数点之后进行转化
if
(
Num
.
indexOf
(
"."
)
!=
-
1
)
{
if
(
part
[
1
].
length
>
2
)
{
alertWarning
(
"小数点之后只能保留两位,系统将自动截段"
);
part
[
1
]
=
part
[
1
].
substr
(
0
,
2
);
}
for
(
var
i
=
0
;
i
<
part
[
1
].
length
;
i
++
)
{
let
tmpnewchar
=
""
;
let
perchar
=
part
[
1
].
charAt
(
i
);
switch
(
perchar
)
{
case
"0"
:
tmpnewchar
=
"零"
+
tmpnewchar
;
break
;
case
"1"
:
tmpnewchar
=
"壹"
+
tmpnewchar
;
break
;
case
"2"
:
tmpnewchar
=
"贰"
+
tmpnewchar
;
break
;
case
"3"
:
tmpnewchar
=
"叁"
+
tmpnewchar
;
break
;
case
"4"
:
tmpnewchar
=
"肆"
+
tmpnewchar
;
break
;
case
"5"
:
tmpnewchar
=
"伍"
+
tmpnewchar
;
break
;
case
"6"
:
tmpnewchar
=
"陆"
+
tmpnewchar
;
break
;
case
"7"
:
tmpnewchar
=
"柒"
+
tmpnewchar
;
break
;
case
"8"
:
tmpnewchar
=
"捌"
+
tmpnewchar
;
break
;
case
"9"
:
tmpnewchar
=
"玖"
+
tmpnewchar
;
break
;
}
if
(
i
==
0
)
tmpnewchar
=
tmpnewchar
+
"角"
;
if
(
i
==
1
)
tmpnewchar
=
tmpnewchar
+
"分"
;
newchar
=
newchar
+
tmpnewchar
;
}
}
s
=
p
.
replace
(
/
(
零.
)
*零$/
,
''
).
replace
(
/^$/
,
'零'
)
+
unit
[
0
][
i
]
+
s
;
}
}
return
head
+
s
.
replace
(
/
(
零.
)
*零元/
,
'元'
)
// 替换所有无用汉字
.
replace
(
/
(
零.
)
+/g
,
'零'
)
while
(
newchar
.
search
(
"零零"
)
!=
-
1
)
.
replace
(
/^整$/
,
'零元整'
);
newchar
=
newchar
.
replace
(
"零零"
,
"零"
);
newchar
=
newchar
.
replace
(
"零亿"
,
"亿"
);
newchar
=
newchar
.
replace
(
"亿万"
,
"亿"
);
newchar
=
newchar
.
replace
(
"零万"
,
"万"
);
newchar
=
newchar
.
replace
(
"零元"
,
"元"
);
newchar
=
newchar
.
replace
(
"零角"
,
""
);
newchar
=
newchar
.
replace
(
"零分"
,
""
);
if
(
newchar
.
charAt
(
newchar
.
length
-
1
)
==
"元"
||
newchar
.
charAt
(
newchar
.
length
-
1
)
==
"角"
)
{
newchar
=
newchar
+
"整"
;
}
if
(
isNegative
)
{
newchar
=
'负'
+
newchar
;
}
return
newchar
;
},
},
createComprisonFunction
(
propertyName
)
{
createComprisonFunction
(
propertyName
)
{
return
function
(
object1
,
object2
)
{
return
function
(
object1
,
object2
)
{
...
@@ -223,19 +364,19 @@ var commonUtils = {
...
@@ -223,19 +364,19 @@ var commonUtils = {
},
},
//计算两日期时间间隔
//计算两日期时间间隔
getDateTimeInterval
:
function
(
startDate
,
endDate
)
{
getDateTimeInterval
:
function
(
startDate
,
endDate
)
{
var
diff
=
endDate
.
getTime
()
-
startDate
.
getTime
();
//时间差的毫秒数
var
diff
=
endDate
.
getTime
()
-
startDate
.
getTime
();
//时间差的毫秒数
//计算出相差天数
//计算出相差天数
var
days
=
Math
.
floor
(
diff
/
(
24
*
3600
*
1000
));
var
days
=
Math
.
floor
(
diff
/
(
24
*
3600
*
1000
));
//计算出小时数
//计算出小时数
var
leave1
=
diff
%
(
24
*
3600
*
1000
);
//计算天数后剩余的毫秒数
var
leave1
=
diff
%
(
24
*
3600
*
1000
);
//计算天数后剩余的毫秒数
var
hours
=
Math
.
floor
(
leave1
/
(
3600
*
1000
));
var
hours
=
Math
.
floor
(
leave1
/
(
3600
*
1000
));
//计算相差分钟数
//计算相差分钟数
var
leave2
=
leave1
%
(
3600
*
1000
);
//计算小时数后剩余的毫秒数
var
leave2
=
leave1
%
(
3600
*
1000
);
//计算小时数后剩余的毫秒数
var
minutes
=
Math
.
floor
(
leave2
/
(
60
*
1000
));
var
minutes
=
Math
.
floor
(
leave2
/
(
60
*
1000
));
//计算相差秒数
//计算相差秒数
var
leave3
=
leave2
%
(
60
*
1000
);
//计算分钟数后剩余的毫秒数
var
leave3
=
leave2
%
(
60
*
1000
);
//计算分钟数后剩余的毫秒数
var
seconds
=
Math
.
round
(
leave3
/
1000
);
var
seconds
=
Math
.
round
(
leave3
/
1000
);
var
returnStr
=
seconds
+
"秒"
;
var
returnStr
=
seconds
+
"秒"
;
if
(
minutes
>
0
)
{
if
(
minutes
>
0
)
{
...
...
src/components/Hotel/HotelManagement.vue
View file @
3d5c8dfb
...
@@ -326,7 +326,7 @@
...
@@ -326,7 +326,7 @@
</div>
</div>
<div
class=
"btnList"
>
<div
class=
"btnList"
>
<button
@
click=
"goSubInfo('HotelInfo',item.ID)"
class=
"hotelBtn"
>
{{
$t
(
'pub.updateMsg'
)
}}
</button>
<button
@
click=
"goSubInfo('HotelInfo',item.ID)"
class=
"hotelBtn"
>
{{
$t
(
'pub.updateMsg'
)
}}
</button>
<button
@
click=
"goUrl('HotelProductManage2',item)"
class=
"hotelBtn"
>
报价
</button>
<button
@
click=
"goUrl('HotelProductManage2',item)"
class=
"hotelBtn"
>
报价
与库存
</button>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/components/Hotel/HotelProductManage2.vue
View file @
3d5c8dfb
...
@@ -70,6 +70,7 @@
...
@@ -70,6 +70,7 @@
<el-option
label=
"旺季"
value=
"2"
></el-option>
<el-option
label=
"旺季"
value=
"2"
></el-option>
<el-option
label=
"平季"
value=
"3"
></el-option>
<el-option
label=
"平季"
value=
"3"
></el-option>
<el-option
label=
"淡季"
value=
"4"
></el-option>
<el-option
label=
"淡季"
value=
"4"
></el-option>
<el-option
label=
"特别价"
value=
"5"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -211,6 +212,7 @@
...
@@ -211,6 +212,7 @@
<el-option
label=
"旺季"
value=
"2"
></el-option>
<el-option
label=
"旺季"
value=
"2"
></el-option>
<el-option
label=
"平季"
value=
"3"
></el-option>
<el-option
label=
"平季"
value=
"3"
></el-option>
<el-option
label=
"淡季"
value=
"4"
></el-option>
<el-option
label=
"淡季"
value=
"4"
></el-option>
<el-option
label=
"特别价"
value=
"5"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
...
src/components/Hotel/HotelSalesBoard.vue
View file @
3d5c8dfb
...
@@ -201,6 +201,25 @@
...
@@ -201,6 +201,25 @@
<div
class=
"flexOne hotelSalesBoard"
>
<div
class=
"flexOne hotelSalesBoard"
>
<div
class=
"query-box Plan_Query"
>
<div
class=
"query-box Plan_Query"
>
<ul>
<ul>
<li
style=
"display:none;"
>
<span>
<em>
{{
$t
(
'system.quety_area'
)
}}
</em>
<!--
<el-select
v-model=
"msg.QCountry"
clearable
class=
"w150"
filterable
@
change=
"getProvinceList(msg.QCountry,1)"
:placeholder=
"$t('hotel.hotel_country')"
>
<el-option
v-for=
"item in countryList"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
></el-option>
</el-select>
-->
<!--
<el-select
v-model=
"msg.QProvince"
filterable
@
change=
"getProvinceList(msg.QProvince,2)"
:placeholder=
"$t('hotel.hotel_province')"
>
<el-option
v-for=
"item in provinceList"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
></el-option>
</el-select>
<el-select
v-model=
"msg.QCity"
filterable
@
change=
"getProvinceList(msg.QCity,3)"
:placeholder=
"$t('hotel.hotel_city')"
>
<el-option
v-for=
"item in cityList"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
></el-option>
</el-select>
<el-select
v-model=
"msg.QDistrict"
filterable
:placeholder=
"$t('hotel.hotel_area')"
>
<el-option
v-for=
"item in district"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
></el-option>
</el-select>
-->
</span>
</li>
<li>
<li>
<span>
<span>
<em>
酒店
</em>
<em>
酒店
</em>
...
@@ -293,7 +312,11 @@
...
@@ -293,7 +312,11 @@
//总库存
//总库存
TotalInventory
:
0
,
TotalInventory
:
0
,
//使用库存
//使用库存
UseInventory
:
0
UseInventory
:
0
,
//国家 省市 区
provinceList
:
[],
cityList
:
[],
district
:
[],
};
};
},
},
methods
:
{
methods
:
{
...
@@ -422,7 +445,37 @@
...
@@ -422,7 +445,37 @@
},
},
err
=>
{}
err
=>
{}
);
);
}
},
getProvinceList
(
ID
,
type
)
{
//根据省份获取城市
let
msg
=
{
Id
:
ID
};
if
(
type
==
1
)
{
this
.
msg
.
QProvince
=
[];
this
.
msg
.
QCity
=
[];
this
.
msg
.
QDistrict
=
[];
}
else
if
(
type
==
2
)
{
this
.
msg
.
QCity
=
[];
this
.
msg
.
QDistrict
=
[];
}
else
if
(
type
==
3
)
{
this
.
msg
.
QDistrict
=
[];
}
this
.
apipost
(
"dict_post_Destination_GetChildList"
,
msg
,
res
=>
{
if
(
type
==
1
)
{
this
.
provinceList
=
res
.
data
.
data
;
}
else
if
(
type
==
2
)
{
this
.
cityList
=
res
.
data
.
data
;
}
else
if
(
type
==
3
)
{
this
.
district
=
res
.
data
.
data
;
}
},
err
=>
{}
);
},
},
},
mounted
()
{
mounted
()
{
//初始化日历
//初始化日历
...
@@ -438,6 +491,7 @@
...
@@ -438,6 +491,7 @@
this
.
GetHotelList
();
this
.
GetHotelList
();
this
.
initCalendar
();
this
.
initCalendar
();
this
.
GetHoltelInventory
();
this
.
GetHoltelInventory
();
//this.getProvinceList(651,1);
}
}
};
};
...
...
src/components/Hotel/HotelTotalStock.vue
View file @
3d5c8dfb
...
@@ -333,6 +333,21 @@
...
@@ -333,6 +333,21 @@
<div
class=
"flexOne hotelTS"
>
<div
class=
"flexOne hotelTS"
>
<div
class=
"query-box"
>
<div
class=
"query-box"
>
<ul>
<ul>
<li
style=
"display:none;"
>
<span>
<!--
<em>
{{
$t
(
'system.quety_area'
)
}}
</em>
<el-select
v-model=
"msg.QProvince"
filterable
@
change=
"getProvinceList(msg.QProvince,2)"
:placeholder=
"$t('hotel.hotel_province')"
>
<el-option
v-for=
"item in provinceList"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
></el-option>
</el-select>
<el-select
v-model=
"msg.QCity"
filterable
@
change=
"getProvinceList(msg.QCity,3)"
:placeholder=
"$t('hotel.hotel_city')"
>
<el-option
v-for=
"item in cityList"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
></el-option>
</el-select>
<el-select
v-model=
"msg.QDistrict"
filterable
:placeholder=
"$t('hotel.hotel_area')"
>
<el-option
v-for=
"item in district"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
></el-option>
</el-select>
-->
</span>
</li>
<li>
<li>
<span>
<span>
<em>
酒店
</em>
<em>
酒店
</em>
...
@@ -411,7 +426,11 @@
...
@@ -411,7 +426,11 @@
let
startTime
=
new
Date
(
this
.
msg
.
sDate
);
let
startTime
=
new
Date
(
this
.
msg
.
sDate
);
return
startTime
.
getTime
()
>=
time
.
getTime
()
return
startTime
.
getTime
()
>=
time
.
getTime
()
}
}
}
},
//国家 省市 区
provinceList
:
[],
cityList
:
[],
district
:
[],
}
}
},
},
methods
:
{
methods
:
{
...
@@ -476,12 +495,44 @@
...
@@ -476,12 +495,44 @@
d
=
new
Date
(
ds
[
0
],
ds
[
1
]
-
1
+
m
,
_d
>
max
?
max
:
_d
);
d
=
new
Date
(
ds
[
0
],
ds
[
1
]
-
1
+
m
,
_d
>
max
?
max
:
_d
);
return
d
.
toLocaleDateString
().
match
(
/
\d
+/g
).
join
(
'-'
)
return
d
.
toLocaleDateString
().
match
(
/
\d
+/g
).
join
(
'-'
)
},
},
getProvinceList
(
ID
,
type
)
{
//根据省份获取城市
let
msg
=
{
Id
:
ID
};
if
(
type
==
1
)
{
this
.
msg
.
QProvince
=
[];
this
.
msg
.
QCity
=
[];
this
.
msg
.
QDistrict
=
[];
}
else
if
(
type
==
2
)
{
this
.
msg
.
QCity
=
[];
this
.
msg
.
QDistrict
=
[];
}
else
if
(
type
==
3
)
{
this
.
msg
.
QDistrict
=
[];
}
this
.
apipost
(
"dict_post_Destination_GetChildList"
,
msg
,
res
=>
{
if
(
type
==
1
)
{
this
.
provinceList
=
res
.
data
.
data
;
}
else
if
(
type
==
2
)
{
this
.
cityList
=
res
.
data
.
data
;
}
else
if
(
type
==
3
)
{
this
.
district
=
res
.
data
.
data
;
}
},
err
=>
{}
);
},
},
},
mounted
()
{
mounted
()
{
this
.
msg
.
HotelId
=
this
.
$route
.
query
.
HotelId
===
undefined
?
0
:
this
.
$route
.
query
.
HotelId
this
.
msg
.
HotelId
=
this
.
$route
.
query
.
HotelId
===
undefined
?
0
:
this
.
$route
.
query
.
HotelId
this
.
getList
();
this
.
getList
();
this
.
GetHotelList
();
this
.
GetHotelList
();
// this.getProvinceList(651,1);
},
},
}
}
</
script
>
</
script
>
src/components/TravelManager/TravelList/TravelControlList.vue
View file @
3d5c8dfb
...
@@ -583,7 +583,7 @@
...
@@ -583,7 +583,7 @@
<div
class=
"TC_SeatList"
>
{{
$t
(
'Airticket.Air_firstClass'
)
}}
:
{{
item
.
FSeat
}}
</div>
<div
class=
"TC_SeatList"
>
{{
$t
(
'Airticket.Air_firstClass'
)
}}
:
{{
item
.
FSeat
}}
</div>
<div
class=
"TC_SeatList"
>
{{
$t
(
'Airticket.Air_businessClass'
)
}}
:
{{
item
.
CSeat
}}
</div>
<div
class=
"TC_SeatList"
>
{{
$t
(
'Airticket.Air_businessClass'
)
}}
:
{{
item
.
CSeat
}}
</div>
<div
class=
"TC_SeatList"
>
{{
$t
(
'Airticket.Air_EconomyClass'
)
}}
:
{{
item
.
YSeat
}}
</div>
<div
class=
"TC_SeatList"
>
{{
$t
(
'Airticket.Air_EconomyClass'
)
}}
:
{{
item
.
YSeat
}}
</div>
<div
class=
"TC_SeatList"
>
{{
$t
(
'Operation.Op_bindNum'
)
}}
:
<span
style=
"color:red"
>
{{
item
.
BindNum
}}
</span></div>
<div
class=
"TC_SeatList"
style=
"display:none;"
>
{{
$t
(
'Operation.Op_bindNum'
)
}}
:
<span
style=
"color:red"
>
{{
item
.
BindNum
}}
</span></div>
</div>
</div>
</div>
</div>
<div
class=
"el-col"
style=
"width:200px;"
>
<div
class=
"el-col"
style=
"width:200px;"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment