diff --git a/src/pages/service_shop/shop_car_apply.vue b/src/pages/service_shop/shop_car_apply.vue index 887e49a3bb19c6d7499d7ea0e455dbaddb3b3de1..71c94a32f9f9f3aa2c5ccf47c2931ae0d5737907 100644 --- a/src/pages/service_shop/shop_car_apply.vue +++ b/src/pages/service_shop/shop_car_apply.vue @@ -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 => { diff --git a/src/pages/workbench/fwgl/approval_service_detail.vue b/src/pages/workbench/fwgl/approval_service_detail.vue index 294a87bcc05cc0ef1e78eeec22e329211398991e..c84a940a692a3f003388084b4b775fdf04b4ae3d 100644 --- a/src/pages/workbench/fwgl/approval_service_detail.vue +++ b/src/pages/workbench/fwgl/approval_service_detail.vue @@ -19,8 +19,8 @@
审批结果:
@@ -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=[ - { - title:'审批时间:', - info:data.service_apply_info.approval_process[0].approval_time - }, - { - title:'审批单位:', - info:data.service_apply_info.approval_process[0].user_info.department_name - }, - { - title:'审批人:', - info:data.service_apply_info.approval_process[0].user_info.user_name - }, - { - title:'审批意见:', - info:data.service_apply_info.approval_process[0].comments - }, - ] + 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:e.approval_time.split('+')[0].replace("T",' ') + }, + { + title:'审批单位:', + info:e.user_info.department_name + }, + { + title:'审批人:', + info:e.user_info.user_name + }, + { + title:'审批意见:', + 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) {