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
d04806d3
Commit
d04806d3
authored
Feb 28, 2022
by
赵伟庚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
40a66d30
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
393 deletions
+3
-393
src/components/order-list/order-list-list.vue
src/components/order-list/order-list-list.vue
+1
-1
src/components/shop-cloud/shop-cloud-new.vue
src/components/shop-cloud/shop-cloud-new.vue
+2
-392
No files found.
src/components/order-list/order-list-list.vue
View file @
d04806d3
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<el-col
:span=
"5"
>
规格
</el-col>
<el-col
:span=
"5"
>
规格
</el-col>
<el-col
:span=
"5"
>
申请使用期限
</el-col>
<el-col
:span=
"5"
>
申请使用期限
</el-col>
<!--
<el-col
:span=
"3"
>
总价
</el-col>
-->
<!--
<el-col
:span=
"3"
>
总价
</el-col>
-->
<el-col
:span=
"5"
>
申请
状态
</el-col>
<el-col
:span=
"5"
>
订单
状态
</el-col>
<el-col
:span=
"3"
>
操作
</el-col>
<el-col
:span=
"3"
>
操作
</el-col>
</el-row>
</el-row>
</div>
</div>
...
...
src/components/shop-cloud/shop-cloud-new.vue
View file @
d04806d3
...
@@ -612,10 +612,7 @@
...
@@ -612,10 +612,7 @@
<block-radius
:borRadius=
"8"
v-if=
"!(activeName == 1 && !formShow)"
>
<block-radius
:borRadius=
"8"
v-if=
"!(activeName == 1 && !formShow)"
>
<div
class=
"btn_footer fyzj_item"
>
<div
class=
"btn_footer fyzj_item"
>
<el-button
<el-button
:class=
"
class=
"submit"
getSumCoin
<
=
user_info
.
account_balance
?
'
submit
'
:
'
nosubmit
'
"
:disabled=
"getSumCoin > user_info.account_balance"
@
click=
"submitApp"
@
click=
"submitApp"
>
>
提交申请
提交申请
...
@@ -986,394 +983,7 @@ export default {
...
@@ -986,394 +983,7 @@ export default {
props
:
{
props
:
{
name
:
{
type
:
String
,
default
:
""
}
,
name
:
{
type
:
String
,
default
:
""
}
,
}
,
}
,
computed
:
{
computed
:
{
}
,
getSumCoin
()
{
let
sumCM
=
0
;
let
sumDisk
=
0
;
let
a_deductions
=
0
;
let
arrJifei
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
jifeiList
));
if
(
this
.
activeName
==
"
0
"
)
{
a_deductions
=
this
.
deductions
;
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
;
}
);
this
.
eci_single_money
=
Number
(
priceObj
.
price
);
sumCM
+=
Number
(
priceObj
.
price
);
}
else
if
(
this
.
formNew
.
memory
==
"
32
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
((
item
)
=>
{
return
item
.
cpu
==
8
&&
item
.
memory
==
32
;
}
);
this
.
eci_single_money
=
Number
(
priceObj
.
price
);
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
;
}
);
this
.
eci_single_money
=
Number
(
priceObj
.
price
);
sumCM
+=
Number
(
priceObj
.
price
);
}
else
if
(
this
.
formNew
.
memory
==
"
64
"
)
{
let
priceObj
=
this
.
cpu_memory
.
find
((
item
)
=>
{
return
item
.
cpu
==
16
&&
item
.
memory
==
64
;
}
);
this
.
eci_single_money
=
Number
(
priceObj
.
price
);
sumCM
+=
Number
(
priceObj
.
price
);
}
}
}
sumCM
=
sumCM
*
Number
(
this
.
formNew
.
appDuration
);
if
(
this
.
formNew
.
dataDisk
>=
0
&&
this
.
formNew
.
perDataDisk
>=
0
&&
this
.
formNew
.
appDuration
>=
0
)
{
if
(
this
.
hard_disk
&&
this
.
hard_disk
.
length
!=
0
)
{
this
.
disk_single_money
=
Number
(
this
.
hard_disk
[
0
].
price
);
sumDisk
+=
(
Number
(
this
.
formNew
.
dataDisk
)
*
Number
(
this
.
formNew
.
perDataDisk
)
*
Number
(
this
.
formNew
.
appDuration
)
*
Number
(
this
.
hard_disk
[
0
].
price
)
).
toFixed
(
2
);
}
arrJifei
[
2
]
=
{
name
:
"
数据盘
"
,
num
:
`${this.formNew.dataDisk
}
个数据盘,每个数据盘${this.formNew.perDataDisk
}
GB`
,
time
:
`${this.formNew.appDuration
}
个月`
,
sum
:
`${sumDisk
}
金币`
,
}
;
}
else
{
arrJifei
.
splice
(
2
);
}
arrJifei
[
0
].
num
=
`${this.formNew.cpu >= 1 ? this.formNew.cpu : 0
}
核+${
this.formNew.memory >= 1 ? this.formNew.memory : 0
}
G`
;
arrJifei
[
0
].
time
=
`${
this.formNew.appDuration >= 1 ? this.formNew.appDuration : 0
}
个月`
;
arrJifei
[
0
].
sum
=
`${sumCM
}
金币`
;
arrJifei
[
1
].
num
=
`${
this.formNew.containerGroup >= 1 ? this.formNew.containerGroup : 0
}
个`
;
arrJifei
[
1
].
time
=
`${
this.formNew.appDuration >= 1 ? this.formNew.appDuration : 0
}
个月`
;
}
else
if
(
this
.
activeName
==
"
1
"
)
{
let
nochangeCM
=
false
,
nochangeRQ
=
false
;
let
diffDay
=
helper
.
getTwoTimesDiff
(
this
.
paramsOld
.
cloud_end_time
);
a_deductions
=
this
.
deductions
;
if
(
(
this
.
formOld
.
cpu
==
""
&&
this
.
formOld
.
memory
==
""
)
||
(
this
.
formOld
.
cpu
==
this
.
paramsOld
.
cpu
&&
this
.
formOld
.
memory
==
this
.
paramsOld
.
memory
)
||
(
this
.
formOld
.
cpu
==
""
&&
this
.
formOld
.
memory
==
this
.
paramsOld
.
memory
)
||
(
this
.
formOld
.
cpu
==
this
.
paramsOld
.
cpu
&&
this
.
formOld
.
memory
==
""
)
)
{
console
.
log
(
"
noCMchange
"
);
// 没变
nochangeCM
=
true
;
if
(
this
.
formOld
.
appDuration
!=
0
)
{
// 续期
let
cpu0
=
this
.
paramsOld
.
cpu
;
let
memory0
=
this
.
paramsOld
.
memory
;
let
priceObj
=
this
.
cpu_memory
.
find
((
item
)
=>
{
return
item
.
cpu
==
cpu0
&&
item
.
memory
==
memory0
;
}
);
this
.
eci_single_money
=
Number
(
priceObj
.
price
);
sumCM
+=
Number
(
priceObj
.
price
);
sumCM
=
sumCM
*
this
.
formOld
.
appDuration
;
}
else
{
// 不续期
sumCM
=
0
;
}
arrJifei
[
0
].
num
=
`${
this.formOld.cpu && this.formOld.cpu > 0
? this.formOld.cpu
: this.paramsOld.cpu
}
核+${
this.formOld.memory && this.formOld.memory > 0
? this.formOld.memory
: this.paramsOld.memory
}
G`
;
arrJifei
[
0
].
time
=
`${
this.formOld.appDuration >= 1
? this.formOld.appDuration + "个月"
: ""
}
`
;
arrJifei
[
0
].
sum
=
`${sumCM
}
金币`
;
arrJifei
[
1
].
num
=
`${
this.formOld.containerGroup && this.formOld.containerGroup > 0
? this.formOld.containerGroup
: this.paramsOld.containers
}
个`
;
arrJifei
[
1
].
time
=
`${
this.formOld.appDuration >= 1
? this.formOld.appDuration + "个月"
: ""
}
`
;
}
else
if
(
(
this
.
formOld
.
cpu
!=
""
&&
this
.
formOld
.
memory
!=
""
&&
(
this
.
formOld
.
cpu
<
this
.
paramsOld
.
cpu
||
this
.
formOld
.
memory
<
this
.
paramsOld
.
memory
))
||
this
.
formOld
.
cpu
<
this
.
paramsOld
.
cpu
||
this
.
formOld
.
memory
<
this
.
paramsOld
.
memory
)
{
console
.
log
(
"
-CM
"
);
// 减配置
if
(
this
.
formOld
.
appDuration
!=
0
)
{
// 续期
let
cpu0
=
this
.
formOld
.
cpu
||
this
.
paramsOld
.
cpu
;
let
memory0
=
this
.
formOld
.
memory
||
this
.
paramsOld
.
memory
;
let
priceObj
=
this
.
cpu_memory
.
find
((
item
)
=>
{
return
item
.
cpu
==
cpu0
&&
item
.
memory
==
memory0
;
}
);
console
.
log
(
priceObj
)
this
.
eci_single_money
=
Number
(
priceObj
.
price
);
sumCM
+=
Number
(
priceObj
.
price
);
sumCM
=
(
(
sumCM
*
(
Number
(
this
.
formOld
.
appDuration
)
*
30
+
diffDay
))
/
30
).
toFixed
(
2
);
arrJifei
[
0
].
num
=
`${
this.formOld.cpu && this.formOld.cpu > 0
? this.formOld.cpu
: this.paramsOld.cpu
}
核+${
this.formOld.memory && this.formOld.memory > 0
? this.formOld.memory
: this.paramsOld.memory
}
G`
;
arrJifei
[
0
].
time
=
`${
this.formOld.appDuration >= 1
? this.formOld.appDuration + "个月续期+剩余"
: "剩余"
}
${diffDay
}
天`
;
arrJifei
[
0
].
sum
=
`${sumCM
}
金币`
;
arrJifei
[
1
].
num
=
`${
this.formOld.containerGroup && this.formOld.containerGroup > 0
? this.formOld.containerGroup
: this.paramsOld.containers
}
个`
;
arrJifei
[
1
].
time
=
`${
this.formOld.appDuration >= 1
? this.formOld.appDuration + "个月续期+剩余"
: "剩余"
}
${diffDay
}
天`
;
}
else
{
// 不续期
sumCM
=
0
;
arrJifei
[
0
].
num
=
`${
this.formOld.cpu && this.formOld.cpu > 0
? this.formOld.cpu
: this.paramsOld.cpu
}
核+${
this.formOld.memory && this.formOld.memory > 0
? this.formOld.memory
: this.paramsOld.memory
}
G`
;
arrJifei
[
0
].
time
=
`${
this.formOld.appDuration >= 1
? this.formOld.appDuration + "个月续期+剩余"
: "剩余"
}
${diffDay
}
天`
;
arrJifei
[
0
].
sum
=
`${sumCM
}
金币`
;
arrJifei
[
1
].
num
=
`${
this.formOld.containerGroup && this.formOld.containerGroup > 0
? this.formOld.containerGroup
: this.paramsOld.containers
}
个`
;
arrJifei
[
1
].
time
=
`${
this.formOld.appDuration >= 1
? this.formOld.appDuration + "个月续期+剩余"
: "剩余"
}
${diffDay
}
天`
;
}
}
else
{
// 加配置
console
.
log
(
"
+CM
"
);
if
(
this
.
cpu_memory
&&
this
.
cpu_memory
.
length
!=
0
)
{
console
.
log
(
this
.
formOld
.
cpu
,
this
.
formOld
.
memory
);
let
cpu0
=
this
.
formOld
.
cpu
||
this
.
paramsOld
.
cpu
;
let
memory0
=
this
.
formOld
.
memory
||
this
.
paramsOld
.
memory
;
let
priceObj
=
this
.
cpu_memory
.
find
((
item
)
=>
{
return
item
.
cpu
==
cpu0
&&
item
.
memory
==
memory0
;
}
);
this
.
eci_single_money
=
Number
(
priceObj
.
price
);
sumCM
+=
Number
(
priceObj
.
price
);
}
sumCM
=
(
sumCM
*
(
Number
(
this
.
formOld
.
appDuration
)
*
30
+
diffDay
))
/
30
;
arrJifei
[
0
].
num
=
`${
this.formOld.cpu && this.formOld.cpu > 0
? this.formOld.cpu
: this.paramsOld.cpu
}
核+${
this.formOld.memory && this.formOld.memory > 0
? this.formOld.memory
: this.paramsOld.memory
}
G`
;
arrJifei
[
0
].
time
=
`${
this.formOld.appDuration >= 1
? this.formOld.appDuration + "个月续期+剩余"
: "剩余"
}
${diffDay
}
天`
;
arrJifei
[
0
].
sum
=
`${sumCM
}
金币`
;
arrJifei
[
1
].
num
=
`${
this.formOld.containerGroup && this.formOld.containerGroup > 0
? this.formOld.containerGroup
: this.paramsOld.containers
}
个`
;
arrJifei
[
1
].
time
=
`${
this.formOld.appDuration >= 1
? this.formOld.appDuration + "个月续期+剩余"
: "剩余"
}
${diffDay
}
天`
;
}
let
nowHasCap
=
this
.
dataDiskList
.
reduce
(
(
sum
,
e
)
=>
sum
+
e
.
disk_cap
,
0
);
if
(
this
.
formOld
.
dataDisk
>
0
&&
this
.
formOld
.
perDataDisk
>
0
)
{
console
.
log
(
"
jd
"
);
// 加D
if
(
this
.
hard_disk
&&
this
.
hard_disk
.
length
!=
0
)
{
this
.
disk_single_money
=
Number
(
this
.
hard_disk
[
0
].
price
);
sumDisk
+=
Number
(
(
((
Number
(
this
.
formOld
.
dataDisk
)
*
Number
(
this
.
formOld
.
perDataDisk
)
+
nowHasCap
)
*
Number
(
Number
(
this
.
formOld
.
appDuration
)
*
30
+
diffDay
)
*
Number
(
this
.
hard_disk
[
0
].
price
))
/
30
).
toFixed
(
2
)
);
}
arrJifei
[
2
]
=
{
name
:
"
数据盘
"
,
num
:
`增加${this.formOld.dataDisk
}
个数据盘,每个数据盘${
this.formOld.perDataDisk
}
GB${
nowHasCap == 0 ? "" : ",原有数据盘共计剩余" + nowHasCap + "GB"
}
`
,
time
:
`${
this.formOld.appDuration >= 1
? this.formOld.appDuration + "个月续期+剩余"
: "剩余"
}
${diffDay
}
天`
,
sum
:
`${sumDisk
}
金币`
,
}
;
}
else
{
console
.
log
(
"
bjd
"
);
// 不加D,续期
if
(
this
.
formOld
.
appDuration
!=
0
)
{
console
.
log
(
"
bj,xqd
"
);
if
(
this
.
delDataDiskList
.
length
!=
0
)
{
console
.
log
(
"
bj,xq,scd
"
);
if
(
this
.
hard_disk
&&
this
.
hard_disk
.
length
!=
0
)
{
this
.
disk_single_money
=
Number
(
this
.
hard_disk
[
0
].
price
);
sumDisk
+=
Number
(
(
(
nowHasCap
*
Number
(
Number
(
this
.
formOld
.
appDuration
)
*
30
+
diffDay
)
*
Number
(
this
.
hard_disk
[
0
].
price
))
/
30
).
toFixed
(
2
)
);
}
arrJifei
[
2
]
=
{
name
:
"
数据盘
"
,
num
:
`原有数据盘共计剩余${nowHasCap
}
GB`
,
time
:
`${
this.formOld.appDuration >= 1
? this.formOld.appDuration + "个月续期+剩余"
: "剩余"
}
${diffDay
}
天`
,
sum
:
`${sumDisk
}
金币`
,
}
;
}
else
{
console
.
log
(
"
bj,xq,bscd
"
);
// not Del
if
(
this
.
hard_disk
&&
this
.
hard_disk
.
length
!=
0
)
{
this
.
disk_single_money
=
Number
(
this
.
hard_disk
[
0
].
price
);
sumDisk
+=
Number
(
(
nowHasCap
*
Number
(
this
.
formOld
.
appDuration
)
*
Number
(
this
.
hard_disk
[
0
].
price
)
).
toFixed
(
2
)
);
}
arrJifei
[
2
]
=
{
name
:
"
数据盘
"
,
num
:
`原有数据盘共计${nowHasCap
}
GB`
,
time
:
`${
this.formOld.appDuration >= 1
? this.formOld.appDuration + "个月"
: ""
}
`
,
sum
:
`${sumDisk
}
金币`
,
}
;
}
}
else
{
// 不加D,不续期
if
(
this
.
delDataDiskList
.
length
!=
0
)
{
console
.
log
(
"
bj,bxq,scd
"
);
if
(
this
.
hard_disk
&&
this
.
hard_disk
.
length
!=
0
)
{
this
.
disk_single_money
=
Number
(
this
.
hard_disk
[
0
].
price
);
sumDisk
+=
Number
(
(
(
nowHasCap
*
diffDay
*
Number
(
this
.
hard_disk
[
0
].
price
))
/
30
).
toFixed
(
2
)
);
}
arrJifei
[
2
]
=
{
name
:
"
数据盘
"
,
num
:
`原有数据盘共计剩余${nowHasCap
}
GB`
,
time
:
`剩余${diffDay
}
天`
,
sum
:
`${sumDisk
}
金币`
,
}
;
}
else
{
console
.
log
(
"
bj,bxq,bscd
"
);
sumDisk
=
0
;
arrJifei
.
splice
(
2
);
}
}
}
if
(
!
this
.
formOld
.
containerGroup
||
this
.
formOld
.
containerGroup
==
""
||
this
.
formOld
.
containerGroup
==
this
.
paramsOld
.
containers
)
{
nochangeRQ
=
true
;
}
if
(
nochangeRQ
&&
this
.
formOld
.
appDuration
==
0
)
{
arrJifei
.
splice
(
1
,
1
);
}
if
(
nochangeCM
&&
this
.
formOld
.
appDuration
==
0
)
{
arrJifei
.
splice
(
0
,
1
);
}
}
this
.
jifeiList1
=
arrJifei
;
console
.
log
(
sumCM
,
sumDisk
);
this
.
amounts_payable
=
Number
(
(
Number
(
sumCM
)
+
Number
(
sumDisk
)).
toFixed
(
2
)
);
// this.total_money = sumCM + sumDisk - a_deductions;
return
this
.
amounts_payable
;
}
,
}
,
watch
:
{
watch
:
{
formNew
:
{
formNew
:
{
handler
()
{
handler
()
{
...
...
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