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

云资源+订单优化

parent 70f51a12
......@@ -12,7 +12,7 @@
</span>
<span v-else v-html="item.info" style="white-space:pre-wrap;"></span>
<span
v-if="item.type && item.type == 'down'"
v-if="item.type && item.type == 'down' && item.url != ''"
class="filebtn"
@click="download(item.url)"
>下载文件</span>
......
......@@ -80,7 +80,7 @@
@click="nextApply"
>再次申请</el-button>
<el-button
v-if="orderDetail.approval_first_level == 1 && orderDetail.approval_second_level == 0 && orderDetail.pay_status != -1"
v-if="(orderDetail.approval_first_level == 0 && orderDetail.pay_status != -1) || (orderDetail.approval_first_level == 1 && orderDetail.approval_second_level == 0 && orderDetail.pay_status != -1)"
class="again"
@click="cancelDetail"
>取消申请</el-button>
......@@ -121,7 +121,7 @@
<img :src="require('@/assets/imgs/img_yunziyuan.png')" class="detail_service_msg_img" />
<div class="detail_service_msg_right">
<div class="detail_service_name_cloud">
<span>{{ orderDetail.namespace }}云资源申请</span>
<span>{{ orderDetail.namespace }}{{ orderDetail.workplace }}</span>
</div>
</div>
</el-col>
......@@ -382,7 +382,10 @@ export default {
.then(response => {
if (response.data.success == 1) {
this.orderDetail = response.data.data;
this.data = JSON.parse(this.orderDetail.res_fields);
if (this.orderDetail.res_fields != "") {
this.data = JSON.parse(this.orderDetail.res_fields);
}
console.log(this.data);
this.getOrderUser();
this.getOrderApproval();
} else {
......@@ -407,7 +410,10 @@ export default {
},
getOrderApproval() {
this.$api.user
.getOrderApproval({ apply_id: this.orderDetail.apply_id })
.getOrderApproval({
apply_id: this.orderDetail.apply_id,
kind: this.orderDetail.order_type
})
.then(response => {
if (response.data.success == 1) {
let data = response.data.data;
......
......@@ -243,7 +243,7 @@
<el-button
v-if="now_user == 1 && apploy_msg.first_level == 0"
class="submit"
@click="submit"
@click="pass"
>提交资源申请</el-button>
<el-button
v-if="now_user == 0 && apploy_msg.second_level != 0"
......@@ -507,22 +507,7 @@ export default {
this.$router.push("/shop/cloud");
},
distribution() {
this.$api.workbench
.setCloudAllocation({ id: this.id, userId: this.user_id })
.then(response => {
if (response.data.success == 1) {
this.$message({
message: "分配成功",
type: "success"
});
this.$router.push(this.getUrl());
} else {
this.$message({
message: "分配失败",
type: "error"
});
}
});
this.$refs.allotConfirm.getDetail(this.apply_id);
},
refuse() {
let query = {
......@@ -602,9 +587,6 @@ export default {
}
});
},
submit() {
this.$refs.allotConfirm.getDetail(this.apply_id);
},
clickTab() {},
// 根据列表参数来判断显示什么
setListWithRole() {
......
......@@ -32,7 +32,7 @@ const user = {
return axios.get(`/apaas/serviceapp/v3/order/applyInfo?order_id=${params.order_id}`);
},
getOrderApproval(params) {
return axios.get(`/apaas/serviceapp/v3/order/approval?apply_id=${params.apply_id}`);
return axios.get(`/apaas/serviceapp/v3/order/approval?apply_id=${params.apply_id}&kind=${params.kind}`);
},
cancelOrder(params) {
return axios.get(`/order/cancel?order_id=${params.order_id}`);
......
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