Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apaas-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gzga-jzapi
apaas-ui
Commits
9c88e63e
Commit
9c88e63e
authored
Nov 04, 2020
by
刘殿昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strong. if no specifications
parent
ddd68a4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
63 deletions
+75
-63
src/components/shop-cloud/shop-cloud.vue
src/components/shop-cloud/shop-cloud.vue
+75
-63
No files found.
src/components/shop-cloud/shop-cloud.vue
View file @
9c88e63e
...
...
@@ -1056,29 +1056,31 @@ export default {
let
a_deductions
=
0
;
if
(
this
.
activeName
==
"
0
"
)
{
a_deductions
=
this
.
deductions
;
if
(
this
.
formNew
.
cpu
==
"
8
"
)
{
if
(
this
.
formNew
.
memory
==
"
16
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
((
item
)
=>
{
return
item
.
cpu
==
8
&&
item
.
memory
==
16
;
}
);
sumCM
+=
Number
(
priceObj
.
price
);
}
else
if
(
this
.
formNew
.
memory
==
"
32
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
((
item
)
=>
{
return
item
.
cpu
==
8
&&
item
.
memory
==
32
;
}
);
sumCM
+=
Number
(
priceObj
.
price
);
}
}
else
if
(
this
.
formNew
.
cpu
==
"
16
"
)
{
if
(
this
.
formNew
.
memory
==
"
32
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
((
item
)
=>
{
return
item
.
cpu
==
16
&&
item
.
memory
==
32
;
}
);
sumCM
+=
Number
(
priceObj
.
price
);
}
else
if
(
this
.
formNew
.
memory
==
"
64
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
((
item
)
=>
{
return
item
.
cpu
==
16
&&
item
.
memory
==
64
;
}
);
sumCM
+=
Number
(
priceObj
.
price
);
if
(
this
.
cpu_memory
&&
this
.
cpu_memory
.
length
!=
0
)
{
if
(
this
.
formNew
.
cpu
==
"
8
"
)
{
if
(
this
.
formNew
.
memory
==
"
16
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
((
item
)
=>
{
return
item
.
cpu
==
8
&&
item
.
memory
==
16
;
}
);
sumCM
+=
Number
(
priceObj
.
price
);
}
else
if
(
this
.
formNew
.
memory
==
"
32
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
((
item
)
=>
{
return
item
.
cpu
==
8
&&
item
.
memory
==
32
;
}
);
sumCM
+=
Number
(
priceObj
.
price
);
}
}
else
if
(
this
.
formNew
.
cpu
==
"
16
"
)
{
if
(
this
.
formNew
.
memory
==
"
32
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
((
item
)
=>
{
return
item
.
cpu
==
16
&&
item
.
memory
==
32
;
}
);
sumCM
+=
Number
(
priceObj
.
price
);
}
else
if
(
this
.
formNew
.
memory
==
"
64
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
((
item
)
=>
{
return
item
.
cpu
==
16
&&
item
.
memory
==
64
;
}
);
sumCM
+=
Number
(
priceObj
.
price
);
}
}
}
sumCM
=
sumCM
*
Number
(
this
.
formNew
.
appDuration
);
...
...
@@ -1087,11 +1089,13 @@ export default {
this
.
formNew
.
perDataDisk
>=
1
&&
this
.
formNew
.
appDuration
>=
1
)
{
sumDisk
+=
Number
(
this
.
formNew
.
dataDisk
)
*
Number
(
this
.
formNew
.
perDataDisk
)
*
Number
(
this
.
formNew
.
appDuration
)
*
Number
(
this
.
hard_disk
[
0
].
price
);
if
(
this
.
hard_disk
&&
this
.
hard_disk
.
length
!=
0
)
{
sumDisk
+=
Number
(
this
.
formNew
.
dataDisk
)
*
Number
(
this
.
formNew
.
perDataDisk
)
*
Number
(
this
.
formNew
.
appDuration
)
*
Number
(
this
.
hard_disk
[
0
].
price
);
}
this
.
jifeiList1
[
2
]
=
{
name
:
"
数据盘
"
,
num
:
`${this.formNew.dataDisk
}
个数据盘,每个数据盘${this.formNew.perDataDisk
}
GB`
,
...
...
@@ -1116,29 +1120,31 @@ export default {
}
个月`
;
}
else
if
(
this
.
activeName
==
"
1
"
)
{
a_deductions
=
this
.
deductions
;
if
(
this
.
formOld
.
cpu
==
"
8
"
)
{
if
(
this
.
formOld
.
memory
==
"
16
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
((
item
)
=>
{
return
item
.
cpu
==
8
&&
item
.
memory
==
16
;
}
);
sumCM
+=
Number
(
priceObj
.
price
);
}
else
if
(
this
.
formOld
.
memory
==
"
32
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
((
item
)
=>
{
return
item
.
cpu
==
8
&&
item
.
memory
==
32
;
}
);
sumCM
+=
Number
(
priceObj
.
price
);
}
}
else
if
(
this
.
formOld
.
cpu
==
"
16
"
)
{
if
(
this
.
formOld
.
memory
==
"
32
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
((
item
)
=>
{
return
item
.
cpu
==
16
&&
item
.
memory
==
32
;
}
);
sumCM
+=
Number
(
priceObj
.
price
);
}
else
if
(
this
.
formOld
.
memory
==
"
64
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
((
item
)
=>
{
return
item
.
cpu
==
16
&&
item
.
memory
==
64
;
}
);
sumCM
+=
Number
(
priceObj
.
price
);
if
(
this
.
cpu_memory
&&
this
.
cpu_memory
.
length
!=
0
)
{
if
(
this
.
formOld
.
cpu
==
"
8
"
)
{
if
(
this
.
formOld
.
memory
==
"
16
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
((
item
)
=>
{
return
item
.
cpu
==
8
&&
item
.
memory
==
16
;
}
);
sumCM
+=
Number
(
priceObj
.
price
);
}
else
if
(
this
.
formOld
.
memory
==
"
32
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
((
item
)
=>
{
return
item
.
cpu
==
8
&&
item
.
memory
==
32
;
}
);
sumCM
+=
Number
(
priceObj
.
price
);
}
}
else
if
(
this
.
formOld
.
cpu
==
"
16
"
)
{
if
(
this
.
formOld
.
memory
==
"
32
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
((
item
)
=>
{
return
item
.
cpu
==
16
&&
item
.
memory
==
32
;
}
);
sumCM
+=
Number
(
priceObj
.
price
);
}
else
if
(
this
.
formOld
.
memory
==
"
64
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
((
item
)
=>
{
return
item
.
cpu
==
16
&&
item
.
memory
==
64
;
}
);
sumCM
+=
Number
(
priceObj
.
price
);
}
}
}
sumCM
=
sumCM
*
Number
(
this
.
formOld
.
appDuration
);
...
...
@@ -1147,11 +1153,13 @@ export default {
this
.
formOld
.
perDataDisk
>=
1
&&
this
.
formOld
.
appDuration
>=
1
)
{
sumDisk
+=
Number
(
this
.
formOld
.
dataDisk
)
*
Number
(
this
.
formOld
.
perDataDisk
)
*
Number
(
this
.
formOld
.
appDuration
)
*
Number
(
this
.
hard_disk
[
0
].
price
);
if
(
this
.
hard_disk
&&
this
.
hard_disk
.
length
!=
0
)
{
sumDisk
+=
Number
(
this
.
formOld
.
dataDisk
)
*
Number
(
this
.
formOld
.
perDataDisk
)
*
Number
(
this
.
formOld
.
appDuration
)
*
Number
(
this
.
hard_disk
[
0
].
price
);
}
this
.
jifeiList1
[
2
]
=
{
name
:
"
数据盘
"
,
num
:
`${this.formOld.dataDisk
}
个数据盘,每个数据盘${this.formOld.perDataDisk
}
GB`
,
...
...
@@ -1176,7 +1184,9 @@ export default {
}
个月`
;
}
// console.log(sumCM, sumDisk)
this
.
amounts_payable
=
Number
((
Number
(
sumCM
)
+
Number
(
sumDisk
)).
toFixed
(
2
));
this
.
amounts_payable
=
Number
(
(
Number
(
sumCM
)
+
Number
(
sumDisk
)).
toFixed
(
2
)
);
// this.total_money = sumCM + sumDisk - a_deductions;
return
this
.
amounts_payable
;
}
,
...
...
@@ -1689,7 +1699,9 @@ export default {
disks
:
[
{
disk_num
:
this
.
formNew
.
dataDisk
?
this
.
formNew
.
dataDisk
:
0
,
disk_cap
:
this
.
formNew
.
perDataDisk
?
this
.
formNew
.
perDataDisk
:
0
,
disk_cap
:
this
.
formNew
.
perDataDisk
?
this
.
formNew
.
perDataDisk
:
0
,
store_type
:
"
nfs-client
"
,
}
,
],
...
...
@@ -1741,11 +1753,11 @@ export default {
],
remove_disks
:
this
.
delDataDiskList
.
map
((
item
)
=>
item
.
id
),
payment
:
{
// total_money: this.total_money,
disk_single_money
:
String
(
this
.
disk_single_money
),
eci_single_money
:
String
(
this
.
eci_single_money
),
total_money
:
String
(
this
.
amounts_payable
),
}
,
// total_money: this.total_money,
disk_single_money
:
String
(
this
.
disk_single_money
),
eci_single_money
:
String
(
this
.
eci_single_money
),
total_money
:
String
(
this
.
amounts_payable
),
}
,
}
;
this
.
$api
.
serviceShop
.
updateCloud
(
query
).
then
((
response
)
=>
{
if
(
response
.
data
.
success
==
1
)
{
...
...
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