Commit 87444509 authored by 刘殿昕's avatar 刘殿昕

Merge branch 'dev'

parents ec84968d 8520c76a
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</span> </span>
<span <span
class="right gap" class="right gap"
v-if="data.yydetail || data.xxdetail || data.yydev||data.public||data.unpublic||data.undeploy||data.deploy" v-if="data.yydetail || data.xxdetail ||data.public||data.unpublic||data.undeploy||data.deploy"
> >
| |
</span> </span>
...@@ -88,9 +88,9 @@ ...@@ -88,9 +88,9 @@
取消发布 取消发布
</span> </span>
<span class="info_fix" v-if="data.yydev" @click="subevent(6)"> <!-- <span class="info_fix" v-if="data.yydev" @click="subevent(6)">
应用开发 应用开发
</span> </span> -->
</p> </p>
<div class="info_detail"> <div class="info_detail">
<p> <p>
......
...@@ -1030,6 +1030,7 @@ export default { ...@@ -1030,6 +1030,7 @@ export default {
let sumCM = 0; let sumCM = 0;
let sumDisk = 0; let sumDisk = 0;
let a_deductions = 0; let a_deductions = 0;
let arrJifei = JSON.parse(JSON.stringify(this.jifeiList1));
if (this.activeName == "0") { if (this.activeName == "0") {
a_deductions = this.deductions; a_deductions = this.deductions;
if (this.cpu_memory && this.cpu_memory.length != 0) { if (this.cpu_memory && this.cpu_memory.length != 0) {
...@@ -1065,9 +1066,9 @@ export default { ...@@ -1065,9 +1066,9 @@ export default {
} }
sumCM = sumCM * Number(this.formNew.appDuration); sumCM = sumCM * Number(this.formNew.appDuration);
if ( if (
this.formNew.dataDisk >= 1 && this.formNew.dataDisk >= 0 &&
this.formNew.perDataDisk >= 1 && this.formNew.perDataDisk >= 0 &&
this.formNew.appDuration >= 1 this.formNew.appDuration >= 0
) { ) {
if (this.hard_disk && this.hard_disk.length != 0) { if (this.hard_disk && this.hard_disk.length != 0) {
this.disk_single_money = Number(this.hard_disk[0].price); this.disk_single_money = Number(this.hard_disk[0].price);
...@@ -1077,26 +1078,26 @@ export default { ...@@ -1077,26 +1078,26 @@ export default {
Number(this.formNew.appDuration) * Number(this.formNew.appDuration) *
Number(this.hard_disk[0].price); Number(this.hard_disk[0].price);
} }
this.jifeiList1[2] = { arrJifei[2] = {
name: "数据盘", name: "数据盘",
num: `${this.formNew.dataDisk}个数据盘,每个数据盘${this.formNew.perDataDisk}GB`, num: `${this.formNew.dataDisk}个数据盘,每个数据盘${this.formNew.perDataDisk}GB`,
time: `${this.formNew.appDuration}个月`, time: `${this.formNew.appDuration}个月`,
sum: `${sumDisk}金币`, sum: `${sumDisk}金币`,
}; };
} else { } else {
this.jifeiList1.splice(2); arrJifei.splice(2);
} }
this.jifeiList1[0].num = `${ arrJifei[0].num = `${this.formNew.cpu >= 1 ? this.formNew.cpu : 0}核+${
this.formNew.cpu >= 1 ? this.formNew.cpu : 0 this.formNew.memory >= 1 ? this.formNew.memory : 0
}核+${this.formNew.memory >= 1 ? this.formNew.memory : 0}G`; }G`;
this.jifeiList1[0].time = `${ arrJifei[0].time = `${
this.formNew.appDuration >= 1 ? this.formNew.appDuration : 0 this.formNew.appDuration >= 1 ? this.formNew.appDuration : 0
}个月`; }个月`;
this.jifeiList1[0].sum = `${sumCM}金币`; arrJifei[0].sum = `${sumCM}金币`;
this.jifeiList1[1].num = `${ arrJifei[1].num = `${
this.formNew.containerGroup >= 1 ? this.formNew.containerGroup : 0 this.formNew.containerGroup >= 1 ? this.formNew.containerGroup : 0
}个`; }个`;
this.jifeiList1[1].time = `${ arrJifei[1].time = `${
this.formNew.appDuration >= 1 ? this.formNew.appDuration : 0 this.formNew.appDuration >= 1 ? this.formNew.appDuration : 0
}个月`; }个月`;
} else if (this.activeName == "1") { } else if (this.activeName == "1") {
...@@ -1134,9 +1135,9 @@ export default { ...@@ -1134,9 +1135,9 @@ export default {
} }
sumCM = sumCM * Number(this.formOld.appDuration); sumCM = sumCM * Number(this.formOld.appDuration);
if ( if (
this.formOld.dataDisk >= 1 && this.formOld.dataDisk >= 0 &&
this.formOld.perDataDisk >= 1 && this.formOld.perDataDisk >= 0 &&
this.formOld.appDuration >= 1 this.formOld.appDuration >= 0
) { ) {
if (this.hard_disk && this.hard_disk.length != 0) { if (this.hard_disk && this.hard_disk.length != 0) {
this.disk_single_money = Number(this.hard_disk[0].price); this.disk_single_money = Number(this.hard_disk[0].price);
...@@ -1146,29 +1147,32 @@ export default { ...@@ -1146,29 +1147,32 @@ export default {
Number(this.formOld.appDuration) * Number(this.formOld.appDuration) *
Number(this.hard_disk[0].price); Number(this.hard_disk[0].price);
} }
this.jifeiList1[2] = { arrJifei[2] = {
name: "数据盘", name: "数据盘",
num: `${this.formOld.dataDisk}个数据盘,每个数据盘${this.formOld.perDataDisk}GB`, num: `${this.formOld.dataDisk}个数据盘,每个数据盘${this.formOld.perDataDisk}GB`,
time: `${this.formOld.appDuration}个月`, time: `${this.formOld.appDuration}个月`,
sum: `${sumDisk}金币`, sum: `${sumDisk}金币`,
}; };
} else { } else {
this.jifeiList1.splice(2); arrJifei.splice(2);
} }
this.jifeiList1[0].num = `${ arrJifei[0].num = `${this.formOld.cpu >= 1 ? this.formOld.cpu : 0}核+${
this.formOld.cpu >= 1 ? this.formOld.cpu : 0 this.formOld.memory >= 1 ? this.formOld.memory : 0
}核+${this.formOld.memory >= 1 ? this.formOld.memory : 0}G`; }G`;
this.jifeiList1[0].time = `${ arrJifei[0].time = `${
this.formOld.appDuration >= 1 ? this.formOld.appDuration : 0 this.formOld.appDuration >= 1 ? this.formOld.appDuration : 0
}个月`; }个月`;
this.jifeiList1[0].sum = `${sumCM}金币`; arrJifei[0].sum = `${sumCM}金币`;
this.jifeiList1[1].num = `${ arrJifei[1].num = `${
this.formOld.containerGroup >= 1 ? this.formOld.containerGroup : 0 this.formOld.containerGroup >= 1 ? this.formOld.containerGroup : 0
}个`; }个`;
this.jifeiList1[1].time = `${ arrJifei[1].time = `${
this.formOld.appDuration >= 1 ? this.formOld.appDuration : 0 this.formOld.appDuration >= 1 ? this.formOld.appDuration : 0
}个月`; }个月`;
} }
this.$nextTick(() => {
this.jifeiList1 = arrJifei;
});
// console.log(sumCM, sumDisk) // console.log(sumCM, sumDisk)
this.amounts_payable = Number( this.amounts_payable = Number(
(Number(sumCM) + Number(sumDisk)).toFixed(2) (Number(sumCM) + Number(sumDisk)).toFixed(2)
...@@ -1629,7 +1633,7 @@ export default { ...@@ -1629,7 +1633,7 @@ export default {
name: "数据盘", name: "数据盘",
num: `${this.dataDiskList.length}个数据盘,共计${this.dataDiskList.length}GB"`, num: `${this.dataDiskList.length}个数据盘,共计${this.dataDiskList.length}GB"`,
time: "0个月", time: "0个月",
sum: "2000金币", sum: "0金币",
}, },
]; ];
} else { } else {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment