Commit 9b53e9f0 authored by 刘殿昕's avatar 刘殿昕

Merge branch 'ldx' into dev

parents 7210f85a 885cd2c7
...@@ -37,27 +37,20 @@ ...@@ -37,27 +37,20 @@
<div class="and_wid"> <div class="and_wid">
<div class="dbn_wkdn"> <div class="dbn_wkdn">
&nbsp;&nbsp;格: &nbsp;&nbsp;格:
<span class="ndwa_indowa"> {{ specification && specification.single_money ? specification.single_money * duration : 0 }} </span> <span class="ndwa_indowa"> {{ data.price * duration }} </span>
<span class="kfdf_jffa">金币</span> <span class="kfdf_jffa">金币</span>
</div> </div>
<div class="nmd_kwd"> <div class="nmd_kwd">
月售: 月售:
<span class="ndwa_dn"> {{ data.mount_count }}</span> <span class="ndwa_dn"> {{ data.sale }}</span>
<img src="@/assets/imgs/shop_ic_star.png" class="dwin_diwa" /> <img src="@/assets/imgs/shop_ic_star.png" class="dwin_diwa" />
<span class="dn_wjd"> {{ data.scoreDetail.avgScore }} </span> <span class="dn_wjd"> {{ data.star }} </span>
</div> </div>
</div> </div>
<div class="commodity_information"> <div class="commodity_information">
<span>&emsp;&emsp;格:</span> <span>&emsp;&emsp;格:</span>
<div class="btn_container"> <div class="btn_container_ddaw">
<el-button {{ data.price }} 金币/月
v-for="(item, index) in specifications"
:key="'specifications_' + index"
:type="item.value === specificationID ? 'primary' : 'default'"
@click="changeSpecification(item)"
>
{{ item.name }}
</el-button>
</div> </div>
</div> </div>
<div class="commodity_information"> <div class="commodity_information">
...@@ -67,7 +60,7 @@ ...@@ -67,7 +60,7 @@
v-model="duration" v-model="duration"
:min="1" :min="1"
:disabled="actionDisabled" :disabled="actionDisabled"
></el-input-number> ></el-input-number>
</div> </div>
</div> </div>
<div class="commodity_action"> <div class="commodity_action">
...@@ -273,6 +266,10 @@ export default { ...@@ -273,6 +266,10 @@ export default {
.commodity_information > .btn_container > .el-input-number { .commodity_information > .btn_container > .el-input-number {
margin: 0 20px 15px 0; margin: 0 20px 15px 0;
} }
.btn_container_ddaw {
line-height: 40px;
margin-left: 5px;
}
.commodity_action { .commodity_action {
margin-top: 60px; margin-top: 60px;
text-align: right; text-align: right;
......
...@@ -64,45 +64,59 @@ ...@@ -64,45 +64,59 @@
<div class="and_wid"> <div class="and_wid">
<div class="dbn_wkdn"> <div class="dbn_wkdn">
&nbsp;&nbsp;格:<span class="ndwa_indowa"> &nbsp;&nbsp;格:<span class="ndwa_indowa">
{{ specification && specification.single_money ? specification.single_money : 0 }} {{
specification && specification.money
? specification.money * (showTime ? duration : 1)
: 0
}}
</span> </span>
<span class="kfdf_jffa">金币</span> <span class="kfdf_jffa">金币</span>
</div> </div>
<div class="nmd_kwd"> <div class="nmd_kwd">
月售:<span class="ndwa_dn">{{ data.mount_count }}</span 月售:<span class="ndwa_dn">{{ data.month_sale }}</span
><img src="@/assets/imgs/shop_ic_star.png" class="dwin_diwa" /> ><img src="@/assets/imgs/shop_ic_star.png" class="dwin_diwa" />
<span class="dn_wjd">{{ data.scoreDetail.avgScore }}</span> <span class="dn_wjd">{{ data.scoreDetail.avgScore }}</span>
</div> </div>
</div> </div>
<div class="commodity_information"> <div class="commodity_information">
<span>计次收费规格:</span> <span>计次收费规格:</span>
<span v-if="data.spce_type_1 && data.spce_type_1.length == 0" class="commodity_text" <span
v-if="
data.serviceRequestSpcs.spcs_type_1 &&
data.serviceRequestSpcs.spcs_type_1.length == 0
"
class="commodity_text"
>暂无</span >暂无</span
> >
<div v-else class="btn_container"> <div v-else class="btn_container">
<el-button <el-button
v-for="(item, index) in data.spce_type_1" v-for="(item, index) in data.serviceRequestSpcs.spcs_type_1"
:key="'spcs_' + index" :key="'spcs_' + index"
:type="item.id === specification.id ? 'primary' : 'default'" :type="item.id === specification.id ? 'primary' : 'default'"
@click="changeSpecification(item, 0)" @click="changeSpecification(item, 0)"
> >
{{ item.name }} {{ item.money }}金币/{{ item.spcs_count }}
</el-button> </el-button>
</div> </div>
</div> </div>
<div class="commodity_information"> <div class="commodity_information">
<span>时长收费规格:</span> <span>时长收费规格:</span>
<span v-if="data.spce_type_2 && data.spce_type_2.length == 0" class="commodity_text" <span
v-if="
data.serviceRequestSpcs.spcs_type_2 &&
data.serviceRequestSpcs.spcs_type_2.length == 0
"
class="commodity_text"
>暂无</span >暂无</span
> >
<div v-else class="btn_container"> <div v-else class="btn_container">
<el-button <el-button
v-for="(item, index) in data.spce_type_2" v-for="(item, index) in data.serviceRequestSpcs.spcs_type_2"
:key="'spcs_' + index" :key="'spcs_' + index"
:type="item.id === specification.id ? 'primary' : 'default'" :type="item.id === specification.id ? 'primary' : 'default'"
@click="changeSpecification(item, 1)" @click="changeSpecification(item, 1)"
> >
{{ item.name }} {{ item.money }}金币/月
</el-button> </el-button>
</div> </div>
</div> </div>
...@@ -122,8 +136,8 @@ ...@@ -122,8 +136,8 @@
v-model="duration" v-model="duration"
:min="1" :min="1"
:disabled="actionDisabled" :disabled="actionDisabled"
></el-input-number ></el-input-number>
>
</div> </div>
<div v-else class="btn_container"> <div v-else class="btn_container">
<el-button type="primary"> 不限时长 </el-button> <el-button type="primary"> 不限时长 </el-button>
...@@ -177,25 +191,12 @@ export default { ...@@ -177,25 +191,12 @@ export default {
showTime: false, showTime: false,
}), }),
computed: { computed: {
specifications() {
let specifications = (this.data.serviceRequestSpcs || []).filter(
(item) => item.type == this.type || item.type == 3
);
return specifications;
},
actionDisabled() { actionDisabled() {
return this.specifications.length == 0; let a = this.data.serviceRequestSpcs;
}, return a.spcs_type_1.length == 0 && a.spcs_type_2.length == 0;
},
watch: {
specifications: {
handler() {
this.specification = this.specifications[0];
},
deep: true,
}, },
}, },
watch: {},
methods: { methods: {
dateTransform(datestr = "") { dateTransform(datestr = "") {
return helper.dateStringTransform(datestr); return helper.dateStringTransform(datestr);
...@@ -210,9 +211,6 @@ export default { ...@@ -210,9 +211,6 @@ export default {
}, },
changeType({ value }) { changeType({ value }) {
this.type = value; this.type = value;
if (this.specifications.length > 0) {
this.specification = this.specifications[0];
}
}, },
addToCart() { addToCart() {
// console.log("addToCart"); // console.log("addToCart");
...@@ -296,8 +294,10 @@ export default { ...@@ -296,8 +294,10 @@ export default {
} }
// 初始化规格 // 初始化规格
if (this.specifications.length > 0) { if (this.data.serviceRequestSpcs.spcs_type_1.length > 0) {
this.specification = this.specifications[0]; this.specification = this.data.serviceRequestSpcs.spcs_type_1[0];
} else if (this.data.serviceRequestSpcs.spcs_type_2.length > 0) {
this.specification = this.data.serviceRequestSpcs.spcs_type_2[0];
} }
}, },
}; };
......
...@@ -37,10 +37,10 @@ ...@@ -37,10 +37,10 @@
</div> </div>
</div> </div>
<div class="size"> <div class="size">
<p>{{ data.size }}</p> <p>计次收费:200金币/1000次</p>
<P>{{ data.applytype }}</P>
</div> </div>
<div class="num">{{ data.num }}</div> <div class="num">22222{{ data.num }}</div>
<div class="num">22222{{ data.num }}</div>
<div class="oprate"> <div class="oprate">
<upload-file <upload-file
v-if="data.isMg" v-if="data.isMg"
...@@ -155,19 +155,19 @@ export default { ...@@ -155,19 +155,19 @@ export default {
float: left; float: left;
} }
.serviceinfo { .serviceinfo {
width: 415px; width: 370px;
margin-right: 90px; margin-right: 15px;
} }
.pic { .pic {
width: 116px; width: 116px;
height: 116px; height: 116px;
float: left; float: left;
background-size: contain; background-size: contain;
margin-right: 20px; margin-right: 15px;
} }
.info { .info {
float: left; float: left;
width: 270px; width: 230px;
} }
.info p { .info p {
color: rgba(136, 144, 167, 1); color: rgba(136, 144, 167, 1);
...@@ -193,27 +193,21 @@ export default { ...@@ -193,27 +193,21 @@ export default {
.size { .size {
width: 240px; width: 240px;
height: 107px; height: 107px;
background-color: rgba(249, 250, 252, 1); margin-right: 20px;
border-radius: 8px; display: flex;
margin-right: 70px; justify-content: center;
padding: 20px; align-items: center;
color: rgba(136, 144, 167, 1);
}
.size p:nth-of-type(1) {
line-height: 22px;
margin-bottom: 10px;
} }
.num { .num {
width: 138px; width: 138px;
height: 107px; height: 107px;
line-height: 107px; margin-right: 20px;
font-size: 16px; display: flex;
color: rgba(88, 97, 122, 1); justify-content: center;
margin-right: 55px; align-items: center;
text-align: center;
} }
.oprate { .oprate {
width: 130px; width: 170px;
height: 107px; height: 107px;
padding-top: 34px; padding-top: 34px;
padding-left: 30px; padding-left: 30px;
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
<p class="list_title"> <p class="list_title">
<span>服务信息</span> <span>服务信息</span>
<span>规格</span> <span>规格</span>
<span>数量</span> <span>购买时长</span>
<span>小计</span>
<span>操作</span> <span>操作</span>
</p> </p>
<apply-service-state ref="apply_service_state" v-for="(item,index) in service_arr" :idx="index" :key="index+5000" :data="item"></apply-service-state> <apply-service-state ref="apply_service_state" v-for="(item,index) in service_arr" :idx="index" :key="index+5000" :data="item"></apply-service-state>
...@@ -67,13 +68,15 @@ export default { ...@@ -67,13 +68,15 @@ export default {
font-weight: bold; font-weight: bold;
} }
.list_title span:nth-of-type(1){ .list_title span:nth-of-type(1){
margin-right: 460px; margin-right: 420px;
} }
.list_title span:nth-of-type(2){ .list_title span:nth-of-type(2){
margin-right: 315px; margin-right: 165px;
} }
.list_title span:nth-of-type(3){ .list_title span:nth-of-type(3){
margin-right: 155px; margin-right: 112px;
}
.list_title span:nth-of-type(4){
margin-right: 130px;
} }
</style> </style>
...@@ -1047,7 +1047,9 @@ export default { ...@@ -1047,7 +1047,9 @@ export default {
getSumCoin() { getSumCoin() {
let sumCM = 0; let sumCM = 0;
let sumDisk = 0; let sumDisk = 0;
let a_deductions = 0;
if (this.activeName == "0") { if (this.activeName == "0") {
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; sumCM += 10880;
...@@ -1094,6 +1096,7 @@ export default { ...@@ -1094,6 +1096,7 @@ export default {
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") {
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; sumCM += 10880;
...@@ -1140,7 +1143,9 @@ export default { ...@@ -1140,7 +1143,9 @@ export default {
this.formOld.appDuration >= 1 ? this.formOld.appDuration : 0 this.formOld.appDuration >= 1 ? this.formOld.appDuration : 0
}个月`; }个月`;
} }
return sumCM + sumDisk; this.amounts_payable = sumCM + sumDisk;
this.total_money = sumCM + sumDisk - a_deductions;
return this.total_money;
}, },
}, },
data() { data() {
...@@ -1170,6 +1175,11 @@ export default { ...@@ -1170,6 +1175,11 @@ export default {
} }
}; };
return { return {
total_money: 0,
disk_single_money: 0,
eci_single_money: 0,
amounts_payable: 0,
deductions: 0,
helper, helper,
form: { form: {
department_name: "", department_name: "",
...@@ -1490,6 +1500,19 @@ export default { ...@@ -1490,6 +1500,19 @@ export default {
this.formOld.apply_file = val[0].url; this.formOld.apply_file = val[0].url;
}, },
handleChange() {}, handleChange() {},
getSpecifications() {
this.$api.serviceShop.getSpecifications().then((response) => {
if (response.data.success == 1) {
this.amounts_payable = 1000;
this.amounts_payable = 1000;
} else {
this.$message({
message: "获取资源规格失败,请刷新网页",
type: "error",
});
}
});
},
getForm(val) { getForm(val) {
if (val !== "") { if (val !== "") {
let paramsOld = this.workSpaceOptions[val]; let paramsOld = this.workSpaceOptions[val];
...@@ -1542,6 +1565,7 @@ export default { ...@@ -1542,6 +1565,7 @@ export default {
sum: "2000金币", sum: "2000金币",
}, },
]; ];
this.deductions = 20000;
} else { } else {
this.formShow = false; this.formShow = false;
} }
...@@ -1627,6 +1651,12 @@ export default { ...@@ -1627,6 +1651,12 @@ export default {
store_type: this.formNew.store_type, store_type: this.formNew.store_type,
}, },
], ],
payment: {
total_money: this.total_money,
disk_single_money: this.disk_single_money,
eci_single_money: this.eci_single_money,
amounts_payable: this.amounts_payable,
},
}; };
this.$api.serviceShop.applicationCloud(query).then((response) => { this.$api.serviceShop.applicationCloud(query).then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
......
...@@ -2,43 +2,74 @@ ...@@ -2,43 +2,74 @@
<div class="shopping_cell"> <div class="shopping_cell">
<el-row class="shopping_cell_row"> <el-row class="shopping_cell_row">
<el-col :span="2" class="shopping_cell_check"> <el-col :span="2" class="shopping_cell_check">
<el-checkbox v-if="!readOnly" v-model="checkedItem" @change="getState"></el-checkbox> <el-checkbox
v-if="!readOnly"
v-model="checkedItem"
@change="getState"
></el-checkbox>
<div v-else class="shopping_cell_expired"> <div v-else class="shopping_cell_expired">
<span>已下架</span> <span>已下架</span>
</div> </div>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="8">
<div class="shopping_cell_item"> <div class="shopping_cell_item">
<img <img
:src="cellIsService ? cellItems.service.cover:cellItems.application.logo" :src="
cellIsService
? cellItems.service.cover
: cellItems.application.logo
"
class="shopping_cell_img" class="shopping_cell_img"
/> />
<div class="shopping_cell_msg"> <div class="shopping_cell_msg">
<div class="shopping_cell_name"> <div class="shopping_cell_name">
{{ cellIsService ? cellItems.service.name:cellItems.application.app_name }} {{
cellIsService
? cellItems.service.name
: cellItems.application.app_name
}}
<span <span
v-if="cellIsService && cellItems.service.data_service_type1_name == '时空服务'" v-if="
cellIsService &&
cellItems.service.data_service_type1_name == '时空服务'
"
class="tags map_service" class="tags map_service"
>mapService</span> >
<span v-if="cellIsService && cellItems.service.openness == 1" class="tags shared">共享</span> mapService
</span>
<span <span
v-else-if="cellIsService && cellItems.service.openness == 2" v-if="cellIsService && cellItems.service.openness == 1"
class="tags shared"
>
共享
</span>
<span
v-else-if="cellIsService && cellItems.service.openness == 2"
class="tags restricted" class="tags restricted"
>受限</span> >
受限
</span>
<span <span
v-else-if="cellIsService && cellItems.service.openness == 3" v-else-if="cellIsService && cellItems.service.openness == 3"
class="tags sensitive" class="tags sensitive"
>敏感</span> >
敏感
</span>
</div> </div>
<div class="shopping_cell_msg_other"> <div class="shopping_cell_msg_other">
<div <div v-if="cellIsService" class="shopping_cell_type">
v-if="cellIsService" {{ cellItems.service.sectors_name }}
class="shopping_cell_type" </div>
>{{ cellItems.service.sectors_name }}</div> <div v-else class="shopping_cell_type">
<div v-else class="shopping_cell_type">{{ cellItems.application.ywly_name }}</div> {{ cellItems.application.ywly_name }}
<div </div>
class="shopping_cell_creator" <div class="shopping_cell_creator">
>{{ cellIsService ? cellItems.service.organization_name:cellItems.application.org_name }}</div> {{
cellIsService
? cellItems.service.organization_name
: cellItems.application.org_name
}}
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -46,11 +77,9 @@ ...@@ -46,11 +77,9 @@
<el-col :span="5"> <el-col :span="5">
<div class="shopping_cell_specification"> <div class="shopping_cell_specification">
<div class="shopping_cell_specification_val"> <div class="shopping_cell_specification_val">
<div class="shopping_cell_specification_val_specification">规格:{{ getSpecification }}</div> <div class="shopping_cell_specification_val_specification">
<div 计次收费:{{ getSpecification }}
class="shopping_cell_specification_val_type" </div>
v-if="cellIsService"
>申请方式:{{ cellItems.duration_method == 1 ? "按月":"按年" }}</div>
<div class="shopping_cell_specification_edit"> <div class="shopping_cell_specification_edit">
<el-popover <el-popover
placement="right-start" placement="right-start"
...@@ -62,21 +91,34 @@ ...@@ -62,21 +91,34 @@
<div v-if="cellIsService"> <div v-if="cellIsService">
<div class="shopping_cell_specification_title">规格:</div> <div class="shopping_cell_specification_title">规格:</div>
<div <div
v-if="cellItems.service.request_spcs_info && cellItems.service.request_spcs_info.length != 0" v-if="
cellItems.service.request_spcs_info &&
cellItems.service.request_spcs_info.length != 0
"
> >
<el-button <el-button
v-for="(item, index) in cellItems.service.request_spcs_info" v-for="(item, index) in cellItems.service
.request_spcs_info"
:key="'specification' + index" :key="'specification' + index"
:class="specificationPop == item.id ? 'shopping_cell_specification_btn active' : 'shopping_cell_specification_btn'" :class="
specificationPop == item.id
? 'shopping_cell_specification_btn active'
: 'shopping_cell_specification_btn'
"
size="mini" size="mini"
@click="changeSpecification(item.id)" @click="changeSpecification(item.id)"
> >
{{ index + 1 + ". " + "访问次数:" + {{
item.pv + index +
"/日," + 1 +
"访问量:" + ". " +
item.count + "访问次数:" +
"/日" }} item.pv +
"/日," +
"访问量:" +
item.count +
"/日"
}}
</el-button> </el-button>
</div> </div>
<div class="no_option" v-else>暂无规格</div> <div class="no_option" v-else>暂无规格</div>
...@@ -87,22 +129,18 @@ ...@@ -87,22 +129,18 @@
<el-button <el-button
v-for="(item, index) in appSpecificationBtns" v-for="(item, index) in appSpecificationBtns"
:key="'specification' + index" :key="'specification' + index"
:class="specificationPop == item.id ? 'shopping_cell_specification_btn active' : 'shopping_cell_specification_btn'" :class="
specificationPop == item.id
? 'shopping_cell_specification_btn active'
: 'shopping_cell_specification_btn'
"
size="mini" size="mini"
@click="changeSpecification(item.id)" @click="changeSpecification(item)"
>{{ index + 1 + ". " + item.value }}</el-button> >
{{ index + 1 + ". " + item.value }}
</el-button>
</div> </div>
</div> </div>
<div v-if="cellIsService" class="shopping_cell_specification_title">申请方式:</div>
<div v-if="cellIsService">
<el-button
v-for="(item, index) in specificationApplicationBtns"
:key="'specification' + index"
:class="specificationApplicationPop == item.id ? 'shopping_cell_specification_btn active' : 'shopping_cell_specification_btn'"
size="mini"
@click="changeSpecificationApplication(item.id)"
>{{ item.value }}购买</el-button>
</div>
</div> </div>
<div class="pop_footer"> <div class="pop_footer">
<el-button <el-button
...@@ -110,12 +148,16 @@ ...@@ -110,12 +148,16 @@
size="mini" size="mini"
type="text" type="text"
@click="visible = false" @click="visible = false"
>取消</el-button> >
取消
</el-button>
<el-button <el-button
class="shopping_cell_specification_submit" class="shopping_cell_specification_submit"
size="mini" size="mini"
@click="submitPop" @click="submitPop"
>确定</el-button> >
确定
</el-button>
</div> </div>
<el-button v-if="!readOnly" circle size="mini" slot="reference"> <el-button v-if="!readOnly" circle size="mini" slot="reference">
<img :src="specificationEdit" /> <img :src="specificationEdit" />
...@@ -126,18 +168,8 @@ ...@@ -126,18 +168,8 @@
</div> </div>
</el-col> </el-col>
<el-col :span="3" class="shopping_cell_num"> <el-col :span="3" class="shopping_cell_num">
<div v-if="cellIsService"> <div v-if="cellIsService && specificationPop.spec_type == 1">不限时长</div>
<el-input-number <div v-else>
:disabled="readOnly"
v-model="cellItems.duration"
@change="changeNum"
size="mini"
:min="1"
></el-input-number>
</div>
</el-col>
<el-col :span="2" class="shopping_cell_num">
<div v-if="cellIsService">
<el-input-number <el-input-number
:disabled="readOnly" :disabled="readOnly"
v-model="cellItems.duration" v-model="cellItems.duration"
...@@ -146,13 +178,17 @@ ...@@ -146,13 +178,17 @@
:min="1" :min="1"
></el-input-number> ></el-input-number>
</div> </div>
</el-col> </el-col>
<el-col :span="3" class="shopping_cell_num"> 200000000金币 </el-col>
<el-col :span="3" class="shopping_cell_options"> <el-col :span="3" class="shopping_cell_options">
<el-checkbox <el-checkbox
v-if="!readOnly" v-if="!readOnly"
v-model="cellItems.is_subscribe" v-model="cellItems.is_subscribe"
@change="changeSubscription" @change="changeSubscription"
>订阅该服务</el-checkbox> >
订阅该服务
</el-checkbox>
<div class="shopping_cell_options_del"> <div class="shopping_cell_options_del">
<el-button @click="delCellItem" size="mini">删除</el-button> <el-button @click="delCellItem" size="mini">删除</el-button>
</div> </div>
......
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
>全选</el-checkbox >全选</el-checkbox
> >
</el-col> </el-col>
<el-col :span="9" class="shopping_all_head_item">服务信息</el-col> <el-col :span="8" class="shopping_all_head_item">服务信息</el-col>
<el-col :span="5" class="shopping_all_head_item">规格</el-col> <el-col :span="5" class="shopping_all_head_item">规格</el-col>
<el-col :span="3" class="shopping_all_head_item">购买时长</el-col> <el-col :span="3" class="shopping_all_head_item">购买时长</el-col>
<el-col :span="2" class="shopping_all_head_item">小计</el-col> <el-col :span="3" class="shopping_all_head_item">小计</el-col>
<el-col :span="3" class="shopping_all_head_item">操作</el-col> <el-col :span="3" class="shopping_all_head_item">操作</el-col>
</el-row> </el-row>
</div> </div>
...@@ -58,8 +58,24 @@ ...@@ -58,8 +58,24 @@
> >
</el-col> </el-col>
<el-col :span="15" class="shopping_cart_options_num"> <el-col :span="15" class="shopping_cart_options_num">
{{ list.length }} 项服务,已选择 <span>{{ getNum }}</span> 项,共 <div class="fyzj">
<span>{{ getSumCoin }}</span> 金币 <p class="fyzj_p">
<span v-if="getSumCoin > 20000" class="yebz">
余额不足,请联系超级管理员进行充值
</span>
费用总计:<span class="fyzj_span">
{{ getSumCoin }}
</span>
<span class="fyzj_qian">金币</span>
</p>
<div class="ckfymx">
<p class="ckfymx_a">
{{ list.length }} 项服务,已选择
<span class="dwa_djf">{{ getNum }}</span>
<span class="ckfymx_qian">账户余额:20,000 金币</span>
</p>
</div>
</div>
</el-col> </el-col>
<el-col :span="4" class="shopping_cart_options_cell"> <el-col :span="4" class="shopping_cart_options_cell">
<el-button <el-button
...@@ -110,7 +126,7 @@ export default { ...@@ -110,7 +126,7 @@ export default {
let sum = 0; let sum = 0;
this.checkList.forEach((item, index) => { this.checkList.forEach((item, index) => {
if (item) { if (item) {
sum += 10; sum += item.total_money;
} }
}); });
return sum; return sum;
...@@ -253,7 +269,7 @@ export default { ...@@ -253,7 +269,7 @@ export default {
font-weight: 500; font-weight: 500;
color: #58617a; color: #58617a;
} }
.shopping_cart_options_num span { .dwa_djf {
color: #e56600; color: #e56600;
} }
.shopping_cart_options_cell_btn { .shopping_cart_options_cell_btn {
...@@ -279,6 +295,52 @@ export default { ...@@ -279,6 +295,52 @@ export default {
.shopping_list_page { .shopping_list_page {
padding: 10px 20px 0; padding: 10px 20px 0;
} }
.fyzj_item {
position: relative;
}
.fyzj {
color: #242c43;
font-size: 18px;
margin-right: 10px;
text-align: right;
position: relative;
top: 8px;
line-height: 26px;
}
.fyzj_p {
margin-bottom: 6px;
}
.fyzj_span {
color: #e56600;
font-size: 24px;
font-weight: bold;
}
.fyzj_qian {
color: #e56600;
font-size: 14px;
}
.ckfymx {
color: #58617a;
font-size: 14px;
}
.ckfymx_a {
color: #58617a;
}
.ckfymx_qian {
display: inline-block;
margin-left: 20px;
position: relative;
color: #a9aec0;
}
.ckfymx_qian::after {
content: "";
position: absolute;
width: 1px;
height: 16px;
background: #bcc1d0;
left: -10px;
top: 2px;
}
</style> </style>
<style> <style>
.shopping_cart_options_cell .el-checkbox { .shopping_cart_options_cell .el-checkbox {
......
<template> <template>
<div class="apply_container"> <div class="apply_container">
<info-list :list_arr="module_arr"> <info-list :list_arr="module_arr">
<apply-form :formInline="formInline" ref="apply_info" slot="apply_info"></apply-form> <apply-form
<service-list ref="apply_service" slot="apply_service" :service_arr="service_arr"></service-list> :formInline="formInline"
ref="apply_info"
slot="apply_info"
></apply-form>
<service-list
ref="apply_service"
slot="apply_service"
:service_arr="service_arr"
></service-list>
</info-list> </info-list>
<div class="footout"> <div class="footout">
<span>{{service_arr.length}}项服务</span> <div class="fyzj">
<p class="fyzj_p">
<span v-if="getSumCoin > 20000" class="yebz">
余额不足,请联系超级管理员进行充值
</span>
费用总计:<span class="fyzj_span">
{{ getSumCoin }}
</span>
<span class="fyzj_qian">金币</span>
</p>
<div class="ckfymx">
<p class="ckfymx_a">
{{ service_arr.length }} 项服务
<span class="ckfymx_qian">账户余额:20,000 金币</span>
</p>
</div>
</div>
<span class="applybtn" @click="sub_service()">提交申请</span> <span class="applybtn" @click="sub_service()">提交申请</span>
</div> </div>
</div> </div>
...@@ -23,6 +47,17 @@ export default { ...@@ -23,6 +47,17 @@ export default {
applyForm, applyForm,
serviceList, serviceList,
}, },
computed: {
getSumCoin() {
let sum = 0;
this.service_arr.forEach((item, index) => {
if (item) {
sum += item.total_money;
}
});
return sum;
},
},
data() { data() {
return { return {
formInline: { formInline: {
...@@ -106,7 +141,6 @@ export default { ...@@ -106,7 +141,6 @@ export default {
}; };
}, },
watch: {}, watch: {},
computed: {},
created() { created() {
if (this.$route.query.service_id) { if (this.$route.query.service_id) {
this.get_one_service(this.$route.query); this.get_one_service(this.$route.query);
...@@ -410,6 +444,7 @@ export default { ...@@ -410,6 +444,7 @@ export default {
padding: 20px; padding: 20px;
text-align: right; text-align: right;
margin: 20px 0; margin: 20px 0;
position: relative;
} }
.applybtn { .applybtn {
color: rgba(252, 239, 214, 1); color: rgba(252, 239, 214, 1);
...@@ -422,5 +457,55 @@ export default { ...@@ -422,5 +457,55 @@ export default {
border-radius: 8px; border-radius: 8px;
margin-left: 20px; margin-left: 20px;
cursor: pointer; cursor: pointer;
position: absolute;
top: 20px;
right: 20px;
}
.fyzj_item {
position: relative;
}
.fyzj {
color: #242c43;
font-size: 18px;
margin-right: 10px;
text-align: right;
position: relative;
top: -8px;
right: 210px;
line-height: 26px;
}
.fyzj_p {
margin-bottom: 6px;
}
.fyzj_span {
color: #e56600;
font-size: 24px;
font-weight: bold;
}
.fyzj_qian {
color: #e56600;
font-size: 14px;
}
.ckfymx {
color: #58617a;
font-size: 14px;
}
.ckfymx_a {
color: #58617a;
}
.ckfymx_qian {
display: inline-block;
margin-left: 20px;
position: relative;
color: #a9aec0;
}
.ckfymx_qian::after {
content: "";
position: absolute;
width: 1px;
height: 16px;
background: #bcc1d0;
left: -10px;
top: 2px;
} }
</style> </style>
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
<service-tabs <service-tabs
:detail-data="detailData" :detail-data="detailData"
:specification-data="specificationData"
:provider-data="providerData" :provider-data="providerData"
:comments-data="commentsData" :comments-data="commentsData"
:comments-url="commentsUrl" :comments-url="commentsUrl"
...@@ -34,7 +33,6 @@ export default { ...@@ -34,7 +33,6 @@ export default {
data: () => ({ data: () => ({
baseInfo: null, baseInfo: null,
detailData: null, detailData: null,
specificationData: null,
providerData: null, providerData: null,
commentsData: null, commentsData: null,
}), }),
...@@ -56,18 +54,6 @@ export default { ...@@ -56,18 +54,6 @@ export default {
}) })
.then(({ data }) => { .then(({ data }) => {
let datas = data.data; let datas = data.data;
let specificationData =
(datas.serviceRequestSpcs &&
datas.serviceRequestSpcs.map((item) => ({
id: item.id,
type: item.type,
pv: item.pv,
count: item.count,
name: `访问次数:${item.pv}次/日 访问量:${item.count}次/日`,
descript: item.des,
}))) ||
[];
this.baseInfo = { this.baseInfo = {
service_id: this.id, service_id: this.id,
app_id: 0, app_id: 0,
...@@ -87,7 +73,7 @@ export default { ...@@ -87,7 +73,7 @@ export default {
datas.data_service_type3_name, datas.data_service_type3_name,
], ],
descript: datas.descript, descript: datas.descript,
serviceRequestSpcs: specificationData, serviceRequestSpcs: datas.serviceRequestSpcs,
scoreDetail: datas.scoreDetail, scoreDetail: datas.scoreDetail,
}; };
...@@ -185,7 +171,6 @@ export default { ...@@ -185,7 +171,6 @@ export default {
}, },
}, },
]; ];
this.specificationData = specificationData;
this.providerData = { this.providerData = {
organization_name: datas.organization_name, organization_name: datas.organization_name,
picture_path: datas.organization_picture, picture_path: datas.organization_picture,
......
...@@ -55,9 +55,12 @@ export default { ...@@ -55,9 +55,12 @@ export default {
}, },
}) })
.then(({ data }) => { .then(({ data }) => {
this.baseInfo = data.data; this.$api.serviceShop.getExtendedInfo({ id: this.id }).then((response) => {
this.baseInfo = data.data;
this.baseInfo = Object.assign(this.baseInfo, response.data.data);
});
}) })
.catch(function(error) { .catch(function (error) {
console.log(error); console.log(error);
}); });
...@@ -100,7 +103,7 @@ export default { ...@@ -100,7 +103,7 @@ export default {
); );
this.detailData = detailData; this.detailData = detailData;
}) })
.catch(function(error) { .catch(function (error) {
console.log(error); console.log(error);
}); });
...@@ -114,7 +117,7 @@ export default { ...@@ -114,7 +117,7 @@ export default {
phone: data.data.phone, phone: data.data.phone,
}; };
}) })
.catch(function(error) { .catch(function (error) {
console.log(error); console.log(error);
}); });
}, },
......
...@@ -46,6 +46,9 @@ businessArea=${params.businessArea}&developable=${params.developable}&orgSource= ...@@ -46,6 +46,9 @@ businessArea=${params.businessArea}&developable=${params.developable}&orgSource=
checkNameSpaceCouldUse(params) { checkNameSpaceCouldUse(params) {
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() {
return axios.get(``)
},
// shopping cart // shopping cart
addShoppingCart(params) { addShoppingCart(params) {
...@@ -77,7 +80,12 @@ businessArea=${params.businessArea}&developable=${params.developable}&orgSource= ...@@ -77,7 +80,12 @@ businessArea=${params.businessArea}&developable=${params.developable}&orgSource=
}, },
getGeneralOverview() { getGeneralOverview() {
return axios.get(`/apaas/service/v3/statistics/other/index`); return axios.get(`/apaas/service/v3/statistics/other/index`);
} },
// app
getExtendedInfo(params) {
return axios.get(`/apaas/hubApi/market/extendedInfo?id=${params.id}`);
},
} }
export default serviceShop; export default serviceShop;
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