building-sign/pagesA/enterDetail/enterDetail.vue

119 lines
4.7 KiB
Vue
Raw Normal View History

2022-11-18 10:33:37 +00:00
<template>
<view class="pad-x120">
<!-- 头部 -->
<status-nav navBarTitle="工人信息"></status-nav>
<view class="content" :style="{'padding-top':statusHeight+50+'px'}">
<!-- 工人信息 -->
<view class="enter-detail font26">
<view class="item">
<view class="title">姓名</view>
2022-11-22 05:47:31 +00:00
<view class="msg font24"><text v-if="centerDetail.status==1 && centerDetail.real_name!==centerDetail.account.real_name">{{centerDetail.account.real_name}}-</text>{{centerDetail.real_name}}</view>
2022-11-18 10:33:37 +00:00
</view>
<view class="item">
<view class="title">电话</view>
2022-11-22 05:47:31 +00:00
<view class="msg font24"><text v-if="centerDetail.status==1 && centerDetail.mobile!==centerDetail.account.mobile">{{centerDetail.account.mobile}}-</text>{{centerDetail.mobile}}</view>
2022-11-18 10:33:37 +00:00
</view>
<view class="item">
<view class="title">身份证</view>
2022-11-22 05:47:31 +00:00
<view class="msg font24"><text v-if="centerDetail.status==1 && centerDetail.card_number!==centerDetail.account.card_number">{{centerDetail.account.card_number}}-</text>{{centerDetail.card_number}}</view>
2022-11-18 10:33:37 +00:00
</view>
<view class="item">
<view class="title">紧急联系人</view>
2022-11-22 05:47:31 +00:00
<view class="msg font24"><text v-if="centerDetail.status==1 && centerDetail.emergency_contact!==centerDetail.account.emergency_contact">{{centerDetail.account.emergency_contact}}-</text>{{centerDetail.emergency_contact}}</view>
2022-11-18 10:33:37 +00:00
</view>
<view class="item">
<view class="title">联系人电话</view>
2022-11-22 05:47:31 +00:00
<view class="msg font24"><text v-if="centerDetail.status==1 && centerDetail.emergency_phone!==centerDetail.account.emergency_phone">{{centerDetail.account.emergency_phone}}-</text>{{centerDetail.emergency_phone}}</view>
2022-11-18 10:33:37 +00:00
</view>
<view class="item">
<view class="title">银行卡户名</view>
2022-11-22 05:47:31 +00:00
<view class="msg font24"><text v-if="centerDetail.status==1 && centerDetail.bank_card_name!==centerDetail.account.bank_card_name">{{centerDetail.account.bank_card_name}}-</text>{{centerDetail.bank_card_name}}</view>
2022-11-18 10:33:37 +00:00
</view>
<view class="item">
<view class="title">银行卡号</view>
2022-11-22 05:47:31 +00:00
<view class="msg font24"><text v-if="centerDetail.status==1 && centerDetail.bank_card_number!==centerDetail.account.bank_card_number">{{centerDetail.account.bank_card_number}}-</text>{{centerDetail.bank_card_number}}</view>
2022-11-18 10:33:37 +00:00
</view>
<view class="item">
<view class="title">开户行</view>
2022-11-22 05:47:31 +00:00
<view class="msg font24"><text v-if="centerDetail.status==1 && centerDetail.bank_name!==centerDetail.account.bank_name">{{centerDetail.account.bank_name}}-</text>{{centerDetail.bank_name}}</view>
2022-11-18 10:33:37 +00:00
</view>
<view class="item">
<view class="title">技术岗位</view>
2022-11-22 05:47:31 +00:00
<view class="msg font24"><text v-if="centerDetail.status==1 && centerDetail.position_name!==centerDetail.account.position_name">{{centerDetail.account.position_name}}-</text>{{centerDetail.position_name}}</view>
2022-11-18 10:33:37 +00:00
</view>
<view class="item">
<view class="title">工资</view>
2022-11-22 05:47:31 +00:00
<view class="msg font24"><text v-if="centerDetail.status==1 && centerDetail.pay!==centerDetail.account.pay">{{centerDetail.account.pay}}-</text>{{centerDetail.pay}}</view>
2022-11-18 10:33:37 +00:00
</view>
<view class="item">
<view class="title">加入时间</view>
<view class="msg font24">{{centerDetail.check_at}}</view>
</view>
</view>
<!-- 审核按钮 -->
<view class="enter-detail-btns color-white font30" v-if="centerDetail.status==0">
<view class="btn" @tap="submitEv(1)"></view>
<view class="btn" @tap="submitEv(0)">退</view>
</view>
</view>
<!-- 尾部 -->
<tabbar :userType="userType" current="2"></tabbar>
</view>
</template>
<script>
import tabbar from '@/components/tabbar/tabbar';
export default {
components:{
tabbar
},
data() {
return {
statusHeight:uni.getSystemInfoSync().statusBarHeight, //状态栏高度
userType:'director', //账户类型 工人worker 负责人director
centerDetail:{}, //工人信息
id:0, //工人id
}
},
onLoad(op) {
if(op.id){
this.id = op.id;
}
},
onShow() {
// 获取工人信息
this.getEnterDetail();
},
methods: {
// 获取工人信息
getEnterDetail(){
this.$requst.post('/api/v1/manager/check-detail',{id:this.id}).then(res=>{
if(res.code == 0){
console.log(res,'工人信息');
this.centerDetail = res.data;
}
})
},
// 确认&退回
submitEv(type){
this.$requst.post('/api/v1/manager/check-info',{id:this.id,type:type}).then(res=>{
if(res.code == 0){
if(type==0){
this.$toolAll.tools.showToast('已退回');
}else{
this.$toolAll.tools.showToast('已确认');
}
uni.reLaunch({
url:'/pages/director/enter/enter'
})
}else{
this.$toolAll.tools.showToast(res.msg);
}
})
}
}
}
</script>
<style scoped>
</style>