diff --git a/src/assets/imgs/money_table_ico.png b/src/assets/imgs/money_table_ico.png
new file mode 100644
index 0000000000000000000000000000000000000000..ef54b892a7c09e2878789a537c61b7b2a9c7bfa0
Binary files /dev/null and b/src/assets/imgs/money_table_ico.png differ
diff --git a/src/components/shop-car-apply/apply_service_state.vue b/src/components/shop-car-apply/apply_service_state.vue
index 4cd3288fdec39ac2c7f21a2c21105a91f08ab4a3..b164d69671bfc2a59dd62f7a0c5839610ff375df 100644
--- a/src/components/shop-car-apply/apply_service_state.vue
+++ b/src/components/shop-car-apply/apply_service_state.vue
@@ -37,10 +37,10 @@
-
{{ data.size }}
-
{{ data.applytype }}
+
{{data.size}}
{{ data.num }}
+ {{ data.count }}
服务信息
规格
- 数量
+ 购买时长
+ 小计
操作
@@ -67,13 +68,16 @@ export default {
font-weight: bold;
}
.list_title span:nth-of-type(1){
- margin-right: 460px;
+ margin-right: 414px;
}
.list_title span:nth-of-type(2){
- margin-right: 315px;
+ margin-right: 246px;
}
.list_title span:nth-of-type(3){
- margin-right: 155px;
+ margin-right: 96px;
+}
+.list_title span:nth-of-type(4){
+ margin-right: 124px;
}
diff --git a/src/components/table/table-input.vue b/src/components/table/table-input.vue
index 9503aa20d10dceec5e7cb5ec1dcc7f6bd9e84be7..399040e2ac4692e08d25288322f4be33efbec01a 100644
--- a/src/components/table/table-input.vue
+++ b/src/components/table/table-input.vue
@@ -11,6 +11,16 @@
class="table_in_input"
>
+
+
+
{}
@@ -483,7 +487,11 @@ export default {
this.selectedTabsPage = JSON.parse(JSON.stringify(data.newArr));
this.pagination.total = data.total;
if (this.autoAdd) {
- this.addRow();
+ if(this.limitEditLength!==0&&this.limitEditLength<=this.selectedTabsPage.length){
+
+ }else{
+ this.addRow();
+ }
}
if (this.selectedTabsPage[0] && this.selectedTabsPage[0].id) {
} else {
@@ -676,7 +684,11 @@ export default {
val.inputValue != "" &&
val.rowId + 1 == this.selectedTabsPage.length
) {
- this.addRow();
+ if(this.limitEditLength!==0&&this.limitEditLength<=this.selectedTabsPage.length){
+
+ }else{
+ this.addRow();
+ }
}
},
// 根据id修改该行数据
diff --git a/src/pages/service_shop/shop_car_apply.vue b/src/pages/service_shop/shop_car_apply.vue
index 514884d5f95f6a8b4c5dec966165b122c0f301e2..2223a965963dfebde6d2a937032a71d4d46ec652 100644
--- a/src/pages/service_shop/shop_car_apply.vue
+++ b/src/pages/service_shop/shop_car_apply.vue
@@ -6,8 +6,15 @@
@@ -30,6 +37,8 @@ export default {
preson: "",
phone: "",
},
+ all_cost:'',
+ now_money:'',
module_arr: [
{
title: "服务申请",
@@ -120,9 +129,19 @@ export default {
});
this.get_car_list(temp_arr);
}
+ this.get_account_money()
},
mounted() {},
methods: {
+ get_account_money(){
+ this.$http
+ .get(`/apaas/backmgt/user/myAccount`).then(res=>{
+ console.log(res);
+ if(res.data.success){
+ this.now_money = res.data.data.account_balance
+ }
+ })
+ },
get_one_app(app_data) {
this.$http
.get(`/apaas/serviceapp/v3/shopcart/appinfo?app_id=${app_data.app_id}`)
@@ -142,13 +161,14 @@ export default {
this.service_arr[0]["title"] = data.app_name;
this.service_arr[0]["type"] = data.type_name;
this.service_arr[0]["auth"] = data.org_name;
- this.service_arr[0]["size"] =
- "规格:" + (app_data.spec_id == 0 ? "部署" : "开发");
+ this.service_arr[0]["size"] ="应用镜像部署权限:"+data.price+"金币/月";
this.service_arr[0]["applytype"] =
"申请方式:" + (app_data.duration_unit == 1 ? "月" : "年");
this.service_arr[0]["num"] = app_data.duration;
+ this.service_arr[0]["count"] = app_data.duration*parseFloat(data.price)+'金币';
this.service_arr[0]["isMg"] = false;
this.service_arr[0]["isapp"] = true;
+ this.all_cost = app_data.duration*parseFloat(data.price)
}
});
},
@@ -237,6 +257,10 @@ export default {
});
},
sub_service() {
+ if(this.all_cost>this.now_money){
+ this.$message.error('余额不足,请进行充值')
+ return
+ }
let formInline = this.$refs.apply_info.formInline;
let flag = null;
this.$refs.apply_info.$refs.ruleForm.validate((valid) => {
@@ -327,6 +351,7 @@ export default {
get_car_list(car_arr) {
this.service_arr = [];
this.post_arr = [];
+ var temp_cost = 0
this.$http
.get(`/apaas/serviceapp/v3/shopcart/list`)
.then((response) => {
@@ -345,13 +370,14 @@ export default {
this.service_arr[l]["title"] = e.application.app_name;
this.service_arr[l]["type"] = e.application.type_name;
this.service_arr[l]["auth"] = e.application.org_name;
- this.service_arr[l]["size"] =
- "规格:" + (e.spec_id == 0 ? "部署" : "开发");
+ this.service_arr[l]["size"] ="应用镜像部署权限:"+e.application.price+"金币/月";
this.service_arr[l]["applytype"] =
"申请方式:" + (e.duration_method == 1 ? "月" : "年");
this.service_arr[l]["num"] = e.duration;
+ this.service_arr[l]["count"] = e.duration*parseFloat(e.application.price)+'金币';
this.service_arr[l]["isMg"] = false;
this.service_arr[l]["isapp"] = true;
+ temp_cost = temp_cost + e.duration*parseFloat(e.application.price)
} else {
//服务
this.service_arr[l]["img"] = e.service.cover;
@@ -387,6 +413,7 @@ export default {
this.service_arr[l]["isapp"] = false;
}
});
+ this.all_cost = temp_cost
// this.service_arr =
})
.catch((response) => {});
@@ -417,10 +444,36 @@ export default {
height: 44px;
line-height: 44px;
text-align: center;
- display: inline-block;
+ float: right;
background-color: rgba(229, 102, 0, 1);
border-radius: 8px;
margin-left: 20px;
cursor: pointer;
}
+.count_money{
+ float: right;
+ margin-top: -10px;
+}
+.count_money p:nth-of-type(1){
+ font-size: 18px;
+ color: #242c43;
+ margin-bottom: 10px;
+}
+.count_money p:nth-of-type(1) span{
+ color: #e56600;
+}
+.count_money p:nth-of-type(1) span:nth-of-type(1){
+ font-size: 24px;
+}
+.count_money p:nth-of-type(1) span:nth-of-type(2){
+ font-size: 14px;
+}
+.count_money p:nth-of-type(2){
+ font-size: 14px;
+ color: #58617a;
+}
+.count_money p:nth-of-type(2) span:nth-of-type(2){
+ color: #a9aec0;
+ margin-left: 20px;
+}
diff --git a/src/pages/workbench/fwgl/serviceDetail.vue b/src/pages/workbench/fwgl/serviceDetail.vue
index 96318ff2f1abb974aff2b0157858c5893d90e36f..26a903ec6d9f62bbd9f5b655f53e01241b7d6741 100644
--- a/src/pages/workbench/fwgl/serviceDetail.vue
+++ b/src/pages/workbench/fwgl/serviceDetail.vue
@@ -876,7 +876,7 @@ export default {
edit_size_arr: [
{
prop: "type",
- label: '规格类型
',
+ label: '规格类型
',
width: "180px",
align: "center",
type: "select",
@@ -896,11 +896,11 @@ export default {
label: "价格/金币",
width: "200px",
align: "center",
- type: "inputNumber",
+ type: "inputMoney",
},
{
prop: "pv",
- label: "调用次数",
+ label: '调用次数
',
width: "200px",
align: "center",
type: "input",
diff --git a/src/pages/workbench/yygl/app_detail.vue b/src/pages/workbench/yygl/app_detail.vue
index 66529126ea2041eed2cd8dca9a686398d55910e0..1907fe80a7d7520ace8f6fcab121c22e68da98ae 100644
--- a/src/pages/workbench/yygl/app_detail.vue
+++ b/src/pages/workbench/yygl/app_detail.vue
@@ -222,6 +222,7 @@
:couldNotEdit="false"
:radius="true"
:isIndex="true"
+ :limitEditLength="1"
:datas="service_size_data"
@changeTable="now_size_data"
>
@@ -298,6 +299,7 @@ import { mapGetters, mapState } from "vuex";
import apassTable from "@/components/apass-table";
import imageDetail from "@/components/image-detail";
import ListPagination from "@/components/comments-pagination";
+import helper from "@/services/helper";
export default {
components: {
infoList,
@@ -367,59 +369,49 @@ export default {
fileList: [],
trans_log_header:[
{
- prop: "dydw",
+ prop: "department_name",
label: "申请单位",
minWidth: "20%",
align: "left",
},
{
- prop: "dyyw",
+ prop: "system_name",
label: "业务系统",
minWidth: "20%",
align: "left",
},
{
- prop: "sqr",
+ prop: "user_name",
label: "申请人",
minWidth: "20%",
align: "center",
},
{
- prop: "gg",
+ prop: "spcs_descript",
label: "规格",
minWidth: "20%",
align: "left",
},
{
- prop: "sqsc",
+ prop: "duration",
label: "购买时长",
width: "110px",
align: "center",
},
{
- prop: "price",
+ prop: "total_money",
label: "订单总价",
width: "150px",
align: "center",
},
{
- prop: "sqsj",
+ prop: "add_time_name",
label: "交易时间",
width: "160px",
align: "center",
},
],
- trans_log_data:[
- {
- dydw:'机关事务局',
- dyyw:'业务系统',
- sqr:'超管用户',
- gg:'申请获取应用镜像部署权限(3000/月)',
- sqsc:'1',
- price:'3000金币',
- sqsj:'2020-10-12 10:30:52'
- }
- ],
+ trans_log_data:[],
trans_log_arr:[
{
title: "应用交易概览",
@@ -437,16 +429,16 @@ export default {
},
],
trans_all_obj:{
- all:1123,
- times:13215,
- month:1312,
+ all:0,
+ times:0,
+ month:0,
},
service_size_data:[],
service_size_arr: [
{
prop: "type",
label: "规格类别",
- minWidth: "33.33%",
+ width: "300px",
align: "center",
},
{
@@ -457,7 +449,7 @@ export default {
},
{
prop: "price",
- label: "价格",
+ label: "价格(金币)",
width: "200px",
align: "center",
},
@@ -472,16 +464,16 @@ export default {
{
prop: "type",
label: "规格类别",
- width: "150px",
+ width: "250px",
align: "left",
type:'input'
},
{
prop: "price",
- label: "价格",
+ label: "价格(金币)",
width: "200px",
align: "center",
- type: "inputNumber",
+ type: "inputMoney",
},
{
prop: "time",
@@ -653,21 +645,93 @@ export default {
];
},
methods: {
+ get_app_size(){
+ this.$http
+ .get(
+ `/apaas/hubApi/market/appSpecification?id=${this.$route.params.id}`
+ ).then((res)=>{
+ console.log(res);
+ if(res.data.success){
+ var data = res.data.data
+ var temp = [{
+ id:data.id,
+ type:'申请获取应用镜像部署权限',
+ time:'按月',
+ price:data.price,
+ des:data.specifications
+ }]
+
+ this.service_size_data = temp
+ this.size_arr_down = temp
+ }
+ })
+ },
transchangePageSize(value) {
this.transpageSize = value;
this.transcurrentPage = 1;
-
+ this.get_app_trans_data()
},
transchangeCurrentPage(value) {
this.transcurrentPage = value;
-
+ this.get_app_trans_data()
+ },
+ change_service_size(){
+ console.log(this.size_arr_down);
+ this.$http
+ .put(
+ `/apaas/hubApi/market/appSpecification`,{
+ "id":parseInt(this.$route.params.id),
+ "price":this.size_arr_down[0].price,
+ "price_style":0,
+ "specification_category":"申请获取应用镜像部署权限",
+ "specifications":this.size_arr_down[0].des
+ }
+ ).then(res=>{
+ if(res.data.success){
+ this.$message.success('修改成功')
+ this.sizeset_flag = false
+ this.get_app_size()
+ }else{
+ this.$message.error(this.data.errMsg)
+ }
+ })
+
+ },
+ get_app_trans_all(){
+ this.$http
+ .get(
+ `/apaas/hubApi/market/incomeStatistics?id=${this.$route.params.id}&limit=${this.transpageSize}&page=${this.transcurrentPage}`
+ ).then(res=>{
+ if(res.data.success){
+ var data = res.data.data
+ this.trans_all_obj={
+ all:data.sum,
+ times:data.count,
+ month:data.month_count,
+ }
+ }
+ })
+ },
+ get_app_trans_data(){
+ this.$http
+ .get(
+ `/apaas/hubApi/market/transactionRecord?app_id=${this.$route.params.id}&limit=${this.transpageSize}&page=${this.transcurrentPage}`
+ ).then(res=>{
+ console.log(res);
+ if(res.data.success){
+ res.data.data.forEach(e => {
+ e.add_time_name = helper.dateStringTransform(e.add_time)
+ });
+ this.trans_log_data = res.data.data
+ this.translistTotal = res.data.total
+ }
+ })
+
},
- change_service_size(){},
now_size_data(val){
val.forEach(e=>{
e.type = '申请获取应用镜像部署权限'
e.time = '按月'
- e.des = '提供2核4G,4核8G等多种规格'
})
this.size_arr_down = val
},
@@ -1032,6 +1096,9 @@ export default {
if(this.$route.query.source == "apply"){
}else{
+ this.get_app_size()
+ this.get_app_trans_data()
+ this.get_app_trans_all()
this.service_arr[this.now_user].push(...["应用计费规则","应用交易记录"]);
}
}
@@ -1154,6 +1221,7 @@ export default {
text-align: center;
cursor: pointer;
margin-bottom: 30px;
+ margin-top: 30px;
}
.savebtn {
margin-top: 50px;
diff --git a/src/pages/workbench/yygl/apply_app_detail.vue b/src/pages/workbench/yygl/apply_app_detail.vue
index 7a2c9bc05070796243332e87e1e966b676838d08..4a9d42b65737db1bdabbc3eb364286632e9b8775 100644
--- a/src/pages/workbench/yygl/apply_app_detail.vue
+++ b/src/pages/workbench/yygl/apply_app_detail.vue
@@ -136,7 +136,7 @@ export default {
},
{
title: "总价:",
- info: "2000",
+ info: "",
},
{
title: "审批信息",
@@ -231,6 +231,7 @@ export default {
this.$set(this.servicead_arr[2], "url", data.apply_file);
this.$set(this.servicead_arr[3], "info", data.apply_type_name);
this.$set(this.servicead_arr[4], "info", data.apply_time);
+ this.$set(this.servicead_arr[5], "info", data.total_money);
})
.catch(function(response) {});
},
diff --git a/src/pages/workbench/yygl/approval_app_detail.vue b/src/pages/workbench/yygl/approval_app_detail.vue
index 776e2ffdf215f18e80bfa89d5d4e2786d5376d55..60740c509af0b6063a68268c28f5ca18a049fcb5 100644
--- a/src/pages/workbench/yygl/approval_app_detail.vue
+++ b/src/pages/workbench/yygl/approval_app_detail.vue
@@ -247,7 +247,7 @@ export default {
},
{
title: "订单总价:",
- info: "30000"
+ info: ""
}
]
};
@@ -344,6 +344,7 @@ export default {
this.$set(this.list_arr[4], "info", data.apply_file.split('/')[0]);
this.$set(this.list_arr[4], "url", data.apply_file);
this.$set(this.list_arr[5], "info", data.apply_time.replace('Z',' ').replace('T',' '));
+ this.$set(this.list_arr[6], "info", data.total_money);
})
.catch(function(response) {});