221 lines
6.7 KiB
Vue
221 lines
6.7 KiB
Vue
|
<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>
|
|||
|
<view class="msg font24">
|
|||
|
{{centerDetail.account.real_name}}
|
|||
|
<text class="director-arrow" v-if="centerDetail.status==0 && centerDetail.real_name!==centerDetail.account.real_name">
|
|||
|
{{centerDetail.real_name}}
|
|||
|
</text>
|
|||
|
</view>
|
|||
|
</view>
|
|||
|
<view class="item">
|
|||
|
<view class="title">电话</view>
|
|||
|
<view class="msg font24">
|
|||
|
{{centerDetail.account.mobile}}
|
|||
|
<text class="director-arrow" v-if="centerDetail.status==0 && centerDetail.mobile!==centerDetail.account.mobile">
|
|||
|
{{centerDetail.mobile}}
|
|||
|
</text>
|
|||
|
</view>
|
|||
|
</view>
|
|||
|
<view class="item">
|
|||
|
<view class="title">身份证</view>
|
|||
|
<view class="msg font24">
|
|||
|
{{centerDetail.account.card_number}}
|
|||
|
<text class="director-arrow" v-if="centerDetail.status==0 && centerDetail.card_number!==centerDetail.account.card_number">
|
|||
|
{{centerDetail.card_number}}
|
|||
|
</text>
|
|||
|
</view>
|
|||
|
</view>
|
|||
|
<view class="item">
|
|||
|
<view class="title">紧急联系人</view>
|
|||
|
<view class="msg font24">
|
|||
|
{{centerDetail.account.emergency_contact}}
|
|||
|
<text class="director-arrow" v-if="centerDetail.status==0 && centerDetail.emergency_contact!==centerDetail.account.emergency_contact">
|
|||
|
{{centerDetail.emergency_contact}}
|
|||
|
</text>
|
|||
|
</view>
|
|||
|
</view>
|
|||
|
<view class="item">
|
|||
|
<view class="title">联系人电话</view>
|
|||
|
<view class="msg font24">
|
|||
|
{{centerDetail.account.emergency_phone}}
|
|||
|
<text class="director-arrow" v-if="centerDetail.status==0 && centerDetail.emergency_phone!==centerDetail.account.emergency_phone">
|
|||
|
{{centerDetail.emergency_phone}}
|
|||
|
</text>
|
|||
|
</view>
|
|||
|
</view>
|
|||
|
<view class="item">
|
|||
|
<view class="title">银行卡户名</view>
|
|||
|
<view class="msg font24">
|
|||
|
{{centerDetail.account.bank_card_name}}
|
|||
|
<text class="director-arrow" v-if="centerDetail.status==0 && centerDetail.bank_card_name!==centerDetail.account.bank_card_name">
|
|||
|
{{centerDetail.bank_card_name}}
|
|||
|
</text>
|
|||
|
</view>
|
|||
|
</view>
|
|||
|
<view class="item">
|
|||
|
<view class="title">银行卡号</view>
|
|||
|
<view class="msg font24">
|
|||
|
{{centerDetail.account.bank_card_number}}
|
|||
|
<text class="director-arrow" v-if="centerDetail.status==0 && centerDetail.bank_card_number!==centerDetail.account.bank_card_number">
|
|||
|
{{centerDetail.bank_card_number}}
|
|||
|
</text>
|
|||
|
</view>
|
|||
|
</view>
|
|||
|
<view class="item">
|
|||
|
<view class="title">开户行</view>
|
|||
|
<view class="msg font24">
|
|||
|
{{centerDetail.account.bank_name}}
|
|||
|
<text class="director-arrow" v-if="centerDetail.status==0 && centerDetail.bank_name!==centerDetail.account.bank_name">
|
|||
|
{{centerDetail.bank_name}}
|
|||
|
</text>
|
|||
|
</view>
|
|||
|
</view>
|
|||
|
<view class="item">
|
|||
|
<view class="title">技术岗位</view>
|
|||
|
<view class="msg font24">
|
|||
|
{{centerDetail.account.position_name}}
|
|||
|
<text class="director-arrow" v-if="centerDetail.status==0 && centerDetail.position_name!==centerDetail.account.position_name">
|
|||
|
{{centerDetail.position_name}}
|
|||
|
</text>
|
|||
|
</view>
|
|||
|
</view>
|
|||
|
<view class="item">
|
|||
|
<view class="title">工资</view>
|
|||
|
<view class="msg font24">
|
|||
|
{{centerDetail.account.pay}}
|
|||
|
<text class="director-arrow" v-if="centerDetail.status==0 && centerDetail.pay!==centerDetail.account.pay">
|
|||
|
{{centerDetail.pay}}
|
|||
|
</text>元
|
|||
|
</view>
|
|||
|
</view>
|
|||
|
<view class="item">
|
|||
|
<view class="title">加入时间</view>
|
|||
|
<view class="msg font24">{{centerDetail.created_at}}</view>
|
|||
|
</view>
|
|||
|
<view class="item" v-if="centerDetail.status==-1">
|
|||
|
<view class="title">审核状态</view>
|
|||
|
<view class="msg font24 color-red">已退回</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="ifReason=true">退回</view>
|
|||
|
</view>
|
|||
|
</view>
|
|||
|
<!-- 退回理由 -->
|
|||
|
<view class="pop-up-bg" v-if="ifReason">
|
|||
|
<view class="edit-box bg-white">
|
|||
|
<image class="close-btn" src="/static/icon/icon-close-btn.png" mode="aspectFit" @tap="closeReason"></image>
|
|||
|
<view class="title font36">退回理由</view>
|
|||
|
<!-- 其他显示 -->
|
|||
|
<input class="input font26" type="text" v-model="reasonMsg" placeholder="请输入退回理由" placeholder-style="color:rgba(51,51,51,.4)">
|
|||
|
<view class="submit-btn font30 color-white" @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:{}, //工人信息
|
|||
|
reasonMsg:'', //退回理由
|
|||
|
ifReason:false, //是否退回
|
|||
|
id:0, //工人id
|
|||
|
}
|
|||
|
},
|
|||
|
onLoad(op) {
|
|||
|
if(op.id){
|
|||
|
this.id = op.id;
|
|||
|
}
|
|||
|
},
|
|||
|
onShow() {
|
|||
|
// 获取工人信息
|
|||
|
this.getEnterDetail();
|
|||
|
},
|
|||
|
onShareAppMessage(res) {
|
|||
|
let shareObj = {
|
|||
|
title:'工地打卡',
|
|||
|
path: '/pages/pagehome/pagehome',
|
|||
|
imageUrl:'/static/share-logo.jpg',
|
|||
|
}
|
|||
|
// 返回shareObj
|
|||
|
return shareObj;
|
|||
|
},
|
|||
|
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){
|
|||
|
if(type==0){
|
|||
|
let params = {
|
|||
|
id:this.id,
|
|||
|
type:type,
|
|||
|
reason:this.reasonMsg
|
|||
|
}
|
|||
|
// 提交
|
|||
|
this.submitApi(params,type);
|
|||
|
}else{
|
|||
|
let params = {
|
|||
|
id:this.id,
|
|||
|
type:type
|
|||
|
}
|
|||
|
// 提交
|
|||
|
this.submitApi(params,type);
|
|||
|
}
|
|||
|
},
|
|||
|
|
|||
|
// 提交
|
|||
|
submitApi(params,type){
|
|||
|
console.log(params,type,123)
|
|||
|
this.$requst.post('/api/v1/manager/check-info',params).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);
|
|||
|
}
|
|||
|
})
|
|||
|
},
|
|||
|
|
|||
|
// 关闭退回弹窗
|
|||
|
closeReason(){
|
|||
|
this.ifReason = false;
|
|||
|
this.reasonMsg = '';
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
</script>
|
|||
|
<style scoped>
|
|||
|
|
|||
|
</style>
|