Commit 4dd85925 authored by 张俊's avatar 张俊

Merge branch 'zj' into dev

parents d1007ef4 2c5d37d2
......@@ -100,6 +100,7 @@ export default {
val:'mg'
}
],
temp_sub_arr:[]
};
},
......@@ -174,6 +175,18 @@ export default {
})
},
deal_data(data){
data.forEach(e => {
if(e.selected){
e.selected = 1
}else{
e.selected = 0
}
if(e.children&&e.children.length){
this.deal_data(e.children)
}
});
},
sub_service(){
console.log(this.$refs.apply_service.$refs.apply_service_state);
console.log(this.$refs.apply_service.$refs.apply_service_state[0].$refs.apply_service_state_table.metaData);
......@@ -205,10 +218,12 @@ export default {
"app_id": 0,
"scene":temp1[idx].sceneinput,
"apply_file":temp1[idx].fileList,
"apply_fields":temp1[idx].$refs.apply_service_state_table.metaData
"apply_fields":[],
}
)
console.log(temp1[idx].sceneinput);
this.temp_sub_arr = temp1[idx].$refs.apply_service_state_table.metaData
this.deal_data(this.temp_sub_arr)
temp.carts[temp.carts.length - 1]['apply_fields'] = this.temp_sub_arr
}else{
temp.carts.push(
{
......@@ -230,7 +245,6 @@ export default {
this.$message.error('请完善服务申请')
return
}
this.$http
.post(`/apaas/serviceapp/v3/shopcart/apply`,temp)
.then(response => {
......
......@@ -19,8 +19,8 @@
<div class="type_box_select">
<info-list @download="download" :list_arr="now_service==0?list_arr:servicead_arr[now_user]">
<table-um :headers="header_arr" :datas="zd_table_arr" slot="zd_table"></table-um>
<process-card type="approval" :data="approval_arr[now_user]" slot="sp_card"></process-card>
<div class="info_contain1" slot="sp_result">
<process-card type="approval" :data="approval_arr[now_user]" slot="sp_card" v-if="(now_user==1&&service_header_arr['first'][2]!=='待审批')||now_user==2"></process-card>
<div class="info_contain1" slot="sp_result" v-if="service_header_arr['first'][2]=='待审批'">
<el-form ref="form" :rules="rules" :model="form" label-width="0px">
<el-form-item prop="result">
<p class="formname">审批结果:</p>
......@@ -100,28 +100,28 @@ export default {
[],
[],
[
{
title:'一级审批',
result:'',
arr:[
{
title:'审批时间:',
info:''
},
{
title:'审批单位:',
info:''
},
{
title:'审批人:',
info:''
},
{
title:'审批意见:',
info:''
},
]
},
// {
// title:'一级审批',
// result:'',
// arr:[
// {
// title:'审批时间:',
// info:''
// },
// {
// title:'审批单位:',
// info:''
// },
// {
// title:'审批人:',
// info:''
// },
// {
// title:'审批意见:',
// info:''
// },
// ]
// },
]
],
header_arr: [
......@@ -353,26 +353,42 @@ export default {
this.$set(this.list_arr[8], "info", data.service_apply_info.duration+data.service_apply_info.duration_unit);
this.$set(this.list_arr[9], "info", data.request_spcs_info);
this.id = data.service_apply_info.id
if(this.now_user==2){
this.approval_arr[2].arr=[
if(data.service_apply_info.approval_status!==0){
this.servicead_arr[this.now_user].splice(1,1)
}
if(!((now_user==1&&service_header_arr['first'][2]!=='待审批')||now_user==2)){
this.servicead_arr[this.now_user].splice(0,1)
}
data.service_apply_info.approval_process.forEach(e => {
this.approval_arr[this.now_user].push(
{
title:e.level==1?'一级审批':'二级审批',
result:e.status==-1?'审批未通过':e.status==0?'审批中':'审批通过',
}
)
if(e.status!==0){
this.approval_arr[this.now_user][this.approval_arr[this.now_user].length - 1]['arr']=[
{
title:'审批时间:',
info:data.service_apply_info.approval_process[0].approval_time
info:e.approval_time.split('+')[0].replace("T",' ')
},
{
title:'审批单位:',
info:data.service_apply_info.approval_process[0].user_info.department_name
info:e.user_info.department_name
},
{
title:'审批人:',
info:data.service_apply_info.approval_process[0].user_info.user_name
info:e.user_info.user_name
},
{
title:'审批意见:',
info:data.service_apply_info.approval_process[0].comments
info:e.comments
},
]
}
});
console.log(this.approval_arr);
this.zd_table_arr = data.service_apply_info.res_fields?JSON.parse(data.service_apply_info.res_fields):[]
})
.catch(function(response) {
......
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