Commit 4d1c8d14 authored by 刘殿昕's avatar 刘殿昕

soon

parent 8e00cfa1
...@@ -1053,15 +1053,27 @@ export default { ...@@ -1053,15 +1053,27 @@ export default {
a_deductions = this.deductions; a_deductions = this.deductions;
if (this.formNew.cpu == "8") { if (this.formNew.cpu == "8") {
if (this.formNew.memory == "16") { if (this.formNew.memory == "16") {
sumCM += 10880; let priceObj = this.cpu_memory.find(item => {
return item.cpu == 8 && item.memory == 16;
})
sumCM += priceObj.price;
} else if (this.formNew.memory == "32") { } else if (this.formNew.memory == "32") {
sumCM += 16310; let priceObj = this.cpu_memory.find(item => {
return item.cpu == 8 && item.memory == 32;
})
sumCM += priceObj.price;
} }
} else if (this.formNew.cpu == "16") { } else if (this.formNew.cpu == "16") {
if (this.formNew.memory == "32") { if (this.formNew.memory == "32") {
sumCM += 21750; let priceObj = this.cpu_memory.find(item => {
return item.cpu == 16 && item.memory == 32;
})
sumCM += priceObj.price;
} else if (this.formNew.memory == "64") { } else if (this.formNew.memory == "64") {
sumCM += 32610; let priceObj = this.cpu_memory.find(item => {
return item.cpu == 16 && item.memory == 64;
})
sumCM += priceObj.price;
} }
} }
if ( if (
...@@ -1073,7 +1085,7 @@ export default { ...@@ -1073,7 +1085,7 @@ export default {
this.formNew.dataDisk * this.formNew.dataDisk *
this.formNew.perDataDisk * this.formNew.perDataDisk *
this.formNew.appDuration * this.formNew.appDuration *
4.2; this.hard_disk[0].price;
this.jifeiList1[2] = { this.jifeiList1[2] = {
name: "数据盘", name: "数据盘",
num: `${this.formNew.dataDisk}个数据盘,每个数据盘${this.formNew.perDataDisk}GB`, num: `${this.formNew.dataDisk}个数据盘,每个数据盘${this.formNew.perDataDisk}GB`,
...@@ -1100,15 +1112,27 @@ export default { ...@@ -1100,15 +1112,27 @@ export default {
a_deductions = this.deductions; a_deductions = this.deductions;
if (this.formOld.cpu == "8") { if (this.formOld.cpu == "8") {
if (this.formOld.memory == "16") { if (this.formOld.memory == "16") {
sumCM += 10880; let priceObj = this.cpu_memory.find(item => {
return item.cpu == 8 && item.memory == 16;
})
sumCM += priceObj.price;
} else if (this.formOld.memory == "32") { } else if (this.formOld.memory == "32") {
sumCM += 16310; let priceObj = this.cpu_memory.find(item => {
return item.cpu == 8 && item.memory == 32;
})
sumCM += priceObj.price;
} }
} else if (this.formOld.cpu == "16") { } else if (this.formOld.cpu == "16") {
if (this.formOld.memory == "32") { if (this.formOld.memory == "32") {
sumCM += 21750; let priceObj = this.cpu_memory.find(item => {
return item.cpu == 16 && item.memory == 32;
})
sumCM += priceObj.price;
} else if (this.formOld.memory == "64") { } else if (this.formOld.memory == "64") {
sumCM += 32610; let priceObj = this.cpu_memory.find(item => {
return item.cpu == 16 && item.memory == 64;
})
sumCM += priceObj.price;
} }
} }
if ( if (
...@@ -1120,7 +1144,7 @@ export default { ...@@ -1120,7 +1144,7 @@ export default {
this.formOld.dataDisk * this.formOld.dataDisk *
this.formOld.perDataDisk * this.formOld.perDataDisk *
this.formOld.appDuration * this.formOld.appDuration *
4.2; this.hard_disk[0].price;
this.jifeiList1[2] = { this.jifeiList1[2] = {
name: "数据盘", name: "数据盘",
num: `${this.formOld.dataDisk}个数据盘,每个数据盘${this.formOld.perDataDisk}GB`, num: `${this.formOld.dataDisk}个数据盘,每个数据盘${this.formOld.perDataDisk}GB`,
...@@ -1144,7 +1168,7 @@ export default { ...@@ -1144,7 +1168,7 @@ export default {
this.formOld.appDuration >= 1 ? this.formOld.appDuration : 0 this.formOld.appDuration >= 1 ? this.formOld.appDuration : 0
}个月`; }个月`;
} }
this.amounts_payable = sumCM + sumDisk; this.amounts_payable = (sumCM + sumDisk).toFixed(2);
// this.total_money = sumCM + sumDisk - a_deductions; // this.total_money = sumCM + sumDisk - a_deductions;
return this.amounts_payable; return this.amounts_payable;
}, },
...@@ -1444,11 +1468,14 @@ export default { ...@@ -1444,11 +1468,14 @@ export default {
sum: "金币", sum: "金币",
}, },
], ],
cpu_memory: [],
hard_disk: [],
}; };
}, },
mounted() { mounted() {
this.getUser(); this.getUser();
this.getNameSpaceList(); this.getNameSpaceList();
this.getSpecifications();
}, },
methods: { methods: {
getQueryId() { getQueryId() {
...@@ -1505,8 +1532,8 @@ export default { ...@@ -1505,8 +1532,8 @@ export default {
getSpecifications() { getSpecifications() {
this.$api.serviceShop.getSpecifications().then((response) => { this.$api.serviceShop.getSpecifications().then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.amounts_payable = 1000; this.cpu_memory = response.data.data.cpu_memory;
this.amounts_payable = 1000; this.hard_disk = response.data.data.hard_disk;
} else { } else {
this.$message({ this.$message({
message: "获取资源规格失败,请刷新网页", message: "获取资源规格失败,请刷新网页",
...@@ -1648,16 +1675,16 @@ export default { ...@@ -1648,16 +1675,16 @@ export default {
}, },
disks: [ disks: [
{ {
disk_num: this.formNew.dataDisk, disk_num: this.formNew.dataDisk + "",
disk_cap: this.formNew.perDataDisk, disk_cap: this.formNew.perDataDisk + "",
store_type: this.formNew.store_type, store_type: this.formNew.store_type + "",
}, },
], ],
payment: { payment: {
total_money: this.total_money, // total_money: this.total_money,
disk_single_money: this.disk_single_money, disk_single_money: this.disk_single_money,
eci_single_money: this.eci_single_money, eci_single_money: this.eci_single_money,
amounts_payable: this.amounts_payable, total_money: this.amounts_payable,
}, },
}; };
this.$api.serviceShop.applicationCloud(query).then((response) => { this.$api.serviceShop.applicationCloud(query).then((response) => {
......
...@@ -323,7 +323,7 @@ ...@@ -323,7 +323,7 @@
<span class="detail_service_specification_val" <span class="detail_service_specification_val"
>{{ orderDetail.total_money }}金币</span >{{ orderDetail.total_money }}金币</span
> >
<span <!-- <span
v-if=" v-if="
orderDetail.apply_type == 1 && orderDetail.apply_type == 1 &&
orderDetail.amounts_payable - orderDetail.total_money > 0 orderDetail.amounts_payable - orderDetail.total_money > 0
...@@ -334,7 +334,7 @@ ...@@ -334,7 +334,7 @@
{{ orderDetail.amounts_payable }}金币,原规格抵扣: {{ orderDetail.amounts_payable }}金币,原规格抵扣:
{{ orderDetail.amounts_payable - orderDetail.total_money }} {{ orderDetail.amounts_payable - orderDetail.total_money }}
金币) 金币)
</span> </span> -->
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
......
...@@ -702,7 +702,7 @@ export default { ...@@ -702,7 +702,7 @@ export default {
this.list_arr[3].url = data.apply_file; // application file url this.list_arr[3].url = data.apply_file; // application file url
this.list_arr[6].info = data.bgn_time; // get time this.list_arr[6].info = data.bgn_time; // get time
this.list_arr[7].info = data.time_remaining; // remaining days this.list_arr[7].info = data.time_remaining; // remaining days
this.list_arr[8].info = data.amounts_payable; this.list_arr[8].info = data.total_money;
this.list_arr[9].info = data.end_time; // maturity time this.list_arr[9].info = data.end_time; // maturity time
this.list_arr_my[0].info = data.first_level_time || "暂未提交"; // submit application time this.list_arr_my[0].info = data.first_level_time || "暂未提交"; // submit application time
this.list_arr_my[1].info = data.second_level_time || "暂未获取"; // super get time this.list_arr_my[1].info = data.second_level_time || "暂未获取"; // super get time
......
...@@ -586,6 +586,11 @@ export default { ...@@ -586,6 +586,11 @@ export default {
]; ];
}, },
}, },
{
label: "费用",
align: "center",
prop: "total_money"
},
{ {
label: "资源调整结果", label: "资源调整结果",
align: "center", align: "center",
......
...@@ -1484,7 +1484,7 @@ export default { ...@@ -1484,7 +1484,7 @@ export default {
let urls = []; let urls = [];
this.liucheng_list.forEach((item) => { this.liucheng_list.forEach((item) => {
urls.push({ urls.push({
name: item.one_input, req_name: item.one_input,
response_type: "JSON", response_type: "JSON",
req_auth_mthod: 0, req_auth_mthod: 0,
req_auth_token: item.tokenVal, req_auth_token: item.tokenVal,
......
...@@ -47,7 +47,7 @@ businessArea=${params.businessArea}&developable=${params.developable}&orgSource= ...@@ -47,7 +47,7 @@ businessArea=${params.businessArea}&developable=${params.developable}&orgSource=
return axios.get(`/apaas/service/v3/resource/apply/checkNs?namespace=${params.id}`) return axios.get(`/apaas/service/v3/resource/apply/checkNs?namespace=${params.id}`)
}, },
getSpecifications() { getSpecifications() {
return axios.get(``) return axios.get(`/apaas/serviceapp/v3/resource/price`)
}, },
// shopping cart // shopping cart
......
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