工人信息修改完成,打开记录开始
parent
ab1441d0c8
commit
4c7370b847
4
App.vue
4
App.vue
|
@ -6,6 +6,10 @@
|
|||
lng:'' ,// 公司地址经度
|
||||
hostapi:'https://building.scdxtc.cn' // 域名配置
|
||||
},
|
||||
onLaunch() {
|
||||
// uni.removeStorageSync('isRead');
|
||||
// uni.removeStorageSync('ifNotice');
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
.bg-red{ background-color: #ec0707;}
|
||||
.bg-orange{ background-color: #ec7807;}
|
||||
.bg-green{ background-color: #25a63b;}
|
||||
.bg-99{ background-color: #999999;}
|
||||
|
||||
|
||||
/* 内边距 */
|
||||
|
|
|
@ -40,10 +40,15 @@ page{
|
|||
margin: 44rpx auto 12rpx;
|
||||
box-shadow: 0 0 22rpx 8rpx rgba(11,66,101,.25);
|
||||
overflow: hidden;
|
||||
}
|
||||
.sign-top .sign-btn.finish{
|
||||
}
|
||||
.sign-top .sign-btn.orange{
|
||||
background-image: linear-gradient(to top,#eb7607,#ffc600);
|
||||
}
|
||||
.sign-top .sign-btn.green{
|
||||
background-image: linear-gradient(to top,#21a53c,#7bbc2b);
|
||||
}
|
||||
|
||||
|
||||
.sign-top .sign-btn>text{
|
||||
line-height: 30rpx;
|
||||
}
|
||||
|
@ -207,7 +212,7 @@ page{
|
|||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
justify-content: center;
|
||||
padding: 20rpx 30rpx 30rpx;
|
||||
}
|
||||
|
||||
|
@ -230,8 +235,14 @@ page{
|
|||
.notick-status .radio-item,
|
||||
.sign-cate .radio-item{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 70rpx;
|
||||
align-items: center;
|
||||
width: 205rpx;
|
||||
height: 70rpx;
|
||||
margin: 0 10rpx;
|
||||
}
|
||||
.notick-status .radio-item:nth-of-type(2n),
|
||||
.sign-cate .radio-item:nth-of-type(2n){
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.notick-status .radio-item>view:first-child,
|
||||
.sign-cate .radio-item>view:first-child{
|
||||
|
@ -391,7 +402,7 @@ page{
|
|||
border-radius: 5rpx;
|
||||
}
|
||||
.register-information .item .textarea{
|
||||
padding: 5rpx 10rpx;
|
||||
padding: 10rpx 10rpx;
|
||||
height: 186rpx;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
@ -431,13 +442,20 @@ page{
|
|||
width: 19rpx;
|
||||
height: 14rpx;
|
||||
}
|
||||
|
||||
.register-information .register-btns{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: calc(100% - 170rpx);
|
||||
margin: 40rpx 0 2rpx 170rpx;
|
||||
}
|
||||
|
||||
.register-information .submit-btn{
|
||||
width: calc(100% - 170rpx);
|
||||
.register-information .register-btns .btn{
|
||||
width: calc(50% - 15rpx);
|
||||
line-height: 80rpx;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
margin: 26rpx 0 2rpx 170rpx;
|
||||
}
|
||||
|
||||
.register-information .item .name{
|
||||
|
@ -721,7 +739,26 @@ page{
|
|||
align-items: center;
|
||||
width: calc(100% - 176rpx);
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
.information-from .item .picker-msg{
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.information-from .item .picker-msg>picker{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-height: 40px;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
.information-from .item .msg image{
|
||||
width: 88rpx;
|
||||
height: 66rpx !important;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.information-from .item .msg>text{
|
||||
color: #028bfd;
|
||||
|
@ -983,6 +1020,12 @@ page{
|
|||
text-align: right;
|
||||
}
|
||||
|
||||
.enter-detail .item .msg image{
|
||||
width: 88rpx;
|
||||
height: 66rpx !important;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.director-arrow{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="calendar">
|
||||
<view class="calendar" v-if="ifLoading">
|
||||
<view class="data font28 color-white">
|
||||
<view class="btn btn-pro" @tap="proEv"></view>
|
||||
<view class="txt">{{curYear}}年{{curMonth<10?'0'+curMonth:curMonth}}月</view>
|
||||
|
@ -11,9 +11,9 @@
|
|||
<view class="days bg-white font26">
|
||||
<view class="item" v-for="(item,index) in days" :key="index">
|
||||
<view class="txt color-99" v-if="item.status==-2">{{item.date}}</view>
|
||||
<view class="txt color-white bg-green" v-if="statusObj.ok.indexOf(item.status)!==-1">{{item.date}}</view>
|
||||
<view class="txt color-white bg-orange" v-if="statusObj.add.indexOf(item.status)!==-1">{{item.date}}</view>
|
||||
<view class="txt color-white bg-red" v-if="statusObj.no.indexOf(item.status)!==-1">{{item.date}}</view>
|
||||
<view @tap="toDetail(item.status)" class="txt color-white bg-green" v-if="statusObj.ok.indexOf(item.status)!==-1&&statusObj.add.indexOf(item.status)==-1">{{item.date}}</view>
|
||||
<view @tap="toDetail(item.status)" class="txt color-white bg-orange" v-if="statusObj.add.indexOf(item.status)!==-1">{{item.date}}</view>
|
||||
<view @tap="toDetail(item.status)" class="txt color-white bg-red" v-if="statusObj.no.indexOf(item.status)!==-1">{{item.date}}</view>
|
||||
<view class="txt" v-if="statusObj.ok.indexOf(item.status)==-1&&statusObj.add.indexOf(item.status)==-1&&statusObj.no.indexOf(item.status)==-1&&item.status!==-2">{{item.date}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -37,6 +37,7 @@
|
|||
curYear:new Date().getFullYear(), //当前年
|
||||
curMonth:new Date().getMonth() + 1, //当前月
|
||||
statusObj:{}, //状态列表
|
||||
ifLoading:false, //是否加载完成
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -125,11 +126,19 @@
|
|||
|
||||
// 获取状态列表
|
||||
getStatusObj(){
|
||||
this.statusObj = {
|
||||
'ok':[2,5,6,8,12],
|
||||
'add':[4,7,11,22],
|
||||
'no':[19,28]
|
||||
}
|
||||
this.$requst.get('/api/v1/user/month-sign-log',{date:`${this.curYear}-${this.curMonth<10?'0'+this.curMonth:this.curMonth}`}).then(res=>{
|
||||
if(res.code==0){
|
||||
console.log(res,'月度打卡信息');
|
||||
this.statusObj = res.data;
|
||||
this.ifLoading = true;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 去查看打卡记录
|
||||
toDetail(status){
|
||||
let date = `${this.curYear}-${this.curMonth<10?'0'+this.curMonth:this.curMonth}-${status<10?'0'+status:status}`;
|
||||
this.$emit('getDate', date);
|
||||
},
|
||||
|
||||
// 上一月
|
||||
|
|
|
@ -63,9 +63,20 @@
|
|||
break;
|
||||
case 1:
|
||||
if(this.$toolAll.tools.judgeAuth()) {
|
||||
uni.reLaunch({
|
||||
url:'/pages/worker/overtime/overtime',
|
||||
})
|
||||
if(uni.getStorageSync('worker_role')==0){
|
||||
this.$toolAll.tools.showToast('您好,请申请入职!');
|
||||
if(uni.getStorageSync('page-path-options').indexOf('/pages/worker/my/my')==-1){
|
||||
setTimeout(()=>{
|
||||
uni.reLaunch({
|
||||
url:'/pages/worker/my/my?userType=worker',
|
||||
})
|
||||
},800)
|
||||
}
|
||||
}else{
|
||||
uni.reLaunch({
|
||||
url:'/pages/worker/overtime/overtime',
|
||||
})
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
|
|
|
@ -74,6 +74,21 @@ const tools = {
|
|||
let reg_identity = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
|
||||
return !reg_identity.test(identity);
|
||||
},
|
||||
|
||||
/**
|
||||
* @description 图片处理
|
||||
*/
|
||||
handleImg(url) {
|
||||
let imgUrl = '';
|
||||
if(url.indexOf('https://')!==-1 || url.indexOf('http://')!==-1){
|
||||
let baseUrl = url.substring(url.indexOf('//')+2, url.length);
|
||||
imgUrl = `${getApp().globalData.hostapi}`+baseUrl.substring(baseUrl.indexOf('/'), baseUrl.length);
|
||||
}else{
|
||||
imgUrl = `${getApp().globalData.hostapi}`+url;
|
||||
}
|
||||
return imgUrl;
|
||||
},
|
||||
|
||||
/**
|
||||
* @description 手机号中间四位用"****"带替
|
||||
*/
|
||||
|
|
3
main.js
3
main.js
|
@ -18,9 +18,6 @@ Vue.prototype.$toolAll = tools;
|
|||
import requst from '@/jsFile/requst.js';
|
||||
Vue.prototype.$requst = requst;
|
||||
|
||||
//公共域名
|
||||
Vue.prototype.$hostHttp = 'https://building.scdxtc.cn';
|
||||
|
||||
//不显示console.log
|
||||
// if (uni.getSystemInfoSync().platform !== "devtools") {
|
||||
// console.log = () => {}
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
// 去确认&查看详情
|
||||
toDetail(id){
|
||||
uni.navigateTo({
|
||||
url:`/pagesB/enterDetail/enterDetail?id=${id}`,
|
||||
url:`/pagesB/enterDetail/enterDetail?id=${id}&userType=workbench`,
|
||||
})
|
||||
},
|
||||
|
||||
|
|
|
@ -26,7 +26,9 @@
|
|||
<view class="item font26">
|
||||
<text>头像</text>
|
||||
<button class="avatar" open-type="chooseAvatar" @chooseavatar="chooseAvatar">
|
||||
<view class="img"><image :src="userInfo.avatarUrl || logoAvatar" mode="aspectFit"></image></view>
|
||||
<view class="img">
|
||||
<image :src="userInfo.avatarUrl || logoAvatar" mode="aspectFit"></image>
|
||||
</view>
|
||||
</button>
|
||||
</view>
|
||||
<view class="item font26">
|
||||
|
@ -60,7 +62,7 @@
|
|||
};
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
|
||||
},
|
||||
onShow() {
|
||||
// 进入登录
|
||||
|
@ -120,7 +122,7 @@
|
|||
});
|
||||
this.$requst.upload('/api/v1/file/upload/image',{path:url}).then(res=>{
|
||||
if(res.code==0) {
|
||||
this.userInfo.avatarUrl = this.$hostHttp+res.data.src;
|
||||
this.userInfo.avatarUrl = `${getApp().globalData.hostapi}`+res.data.src;
|
||||
}
|
||||
uni.hideLoading();
|
||||
})
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
console.log(res,'用户信息');
|
||||
// 缓存工人状态
|
||||
uni.setStorageSync('worker_role',res.data.role);
|
||||
// 判断进入路面
|
||||
// 判断进入路径
|
||||
if(res.data.role==0 || res.data.role==1){
|
||||
uni.reLaunch({
|
||||
url:'/pages/worker/sign/sign?userType=worker'
|
||||
|
|
|
@ -10,9 +10,14 @@
|
|||
<view class="my-cover">
|
||||
<image :src="userInfo.headimgurl" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="my-txt">
|
||||
<view class="my-txt" v-if="userInfo.role!==2">
|
||||
<view class="font28">{{userInfo.nickname}}</view>
|
||||
<view class="font24">{{userInfo.real_name!==''?userInfo.real_name:'审核中'}}</view>
|
||||
<view class="font24" v-if="userInfo.real_name==''">{{userInfo.checking==1?'入职审核中':'普通用户'}}</view>
|
||||
<view class="font24" v-else>{{userInfo.real_name}}</view>
|
||||
</view>
|
||||
<view class="my-txt" v-else>
|
||||
<view class="font28">{{userInfo.nickname}}</view>
|
||||
<view class="font24">负责人</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -140,8 +145,9 @@
|
|||
this.$requst.post('/api/v1/user/info').then(res=>{
|
||||
if(res.code==0){
|
||||
console.log(res,'用户信息');
|
||||
uni.setStorageSync('baseWorksiteId',res.data.worksite_id)
|
||||
if(res.data.role==0){
|
||||
this.showList = [0,1,2,3,4,5,6,8];
|
||||
this.showList = [0,1,5,6,8];
|
||||
}
|
||||
if(res.data.role==1){
|
||||
this.showList = [0,1,2,3,4,5,7,8];
|
||||
|
@ -150,6 +156,7 @@
|
|||
this.showList = [0,1,2,3,4,5];
|
||||
}
|
||||
this.userInfo = res.data;
|
||||
this.userInfo.headimgurl = this.$toolAll.tools.handleImg(res.data.headimgurl);
|
||||
this.isLoding = true;
|
||||
}
|
||||
})
|
||||
|
@ -159,9 +166,14 @@
|
|||
if(url=='auitApply'){
|
||||
this.showApply = true;
|
||||
}else if(url=='workerApply'){
|
||||
uni.reLaunch({
|
||||
url:'/pages/worker/sign/sign?userType=worker&apply=join'
|
||||
})
|
||||
if(uni.getStorageSync('worksite_id')){
|
||||
uni.navigateTo({
|
||||
url:'/pages/worker/sign/sign?userType=worker&apply=join'
|
||||
})
|
||||
}else{
|
||||
this.$toolAll.tools.showToast('不在可申请范围内');
|
||||
}
|
||||
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url:url
|
||||
|
@ -171,7 +183,15 @@
|
|||
|
||||
// 确认离职
|
||||
submitEv(){
|
||||
this.showApply = false;
|
||||
this.$requst.post('/api/v1/worker/dimission').then(res=>{
|
||||
if(res.code==0){
|
||||
console.log(res,'用户信息');
|
||||
this.$toolAll.tools.showToast('离职申请提交成功');
|
||||
this.showApply = false;
|
||||
}else{
|
||||
this.$toolAll.tools.showToast(res.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,10 +6,18 @@
|
|||
<!-- 打卡 -->
|
||||
<view class="sign-top font24 color-white" :style="{'padding-top':statusHeight+50+'px'}">
|
||||
<image src="/static/sign-bg.jpg" mode="aspectFill"></image>
|
||||
<view class="name font30" v-if="isLoding">{{siteInfo.name}}</view>
|
||||
<view class="sign-btn" :class="finish?'finish':''" @tap="showRadioEv">
|
||||
<text class="font56">{{finish?'已打卡':'打卡'}}</text>
|
||||
<view class="name font30" v-if="isLoding">{{siteInfo.name}}</view>
|
||||
<view class="sign-btn orange" @tap="showRadioEv" v-if="buttonColor=='orange'">
|
||||
<text class="font56">打卡</text>
|
||||
<text>{{currenTime}}</text>
|
||||
</view>
|
||||
<view class="sign-btn green" @tap="showRadioEv" v-else-if="buttonColor=='green'">
|
||||
<text class="font56">已打卡</text>
|
||||
<text>{{currenTime}}</text>
|
||||
</view>
|
||||
<view class="sign-btn" @tap="showRadioEv" v-else>
|
||||
<text class="font56">打卡</text>
|
||||
<text>{{currenTime}}</text>
|
||||
</view>
|
||||
<view class="sign-site">
|
||||
<view class="sign-time">
|
||||
|
@ -37,16 +45,16 @@
|
|||
<view class="item font26" v-for="(item,index) in signList" :key="index">
|
||||
<view class="info">
|
||||
<text>{{item.type_text}}打卡:{{item.created_at.substr(item.created_at.length-8)}}</text>
|
||||
<text>打卡工地:{{item.worksite_name}}</text>
|
||||
<text v-if="item.role!==0">打卡工地:{{item.worksite_name}}</text>
|
||||
</view>
|
||||
<view class="state" :class="item.state==1?'color-blue':''">{{item.status_text}}</view>
|
||||
<view class="state" :class="item.state==1?'color-blue':''" v-if="item.role!==0">{{item.status_text}}</view>
|
||||
</view>
|
||||
<!-- 加载更多 -->
|
||||
<view class="more-tips font24" style="margin-bottom: 15rpx;" v-if="signList.length==0">今日还未打卡</view>
|
||||
</view>
|
||||
<!-- 打卡日历 -->
|
||||
<view class="sign-calendar">
|
||||
<sign-calendar></sign-calendar>
|
||||
<sign-calendar ref="signCalendar" @getDate="getDate"></sign-calendar>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
@ -69,11 +77,11 @@
|
|||
</view>
|
||||
|
||||
<!-- 公告 -->
|
||||
<view class="pop-up-bg" v-if="ifNotice">
|
||||
<view class="pop-up-bg" v-if="ifNotice||ifWsNotice">
|
||||
<view class="safety-bulletin bg-white">
|
||||
<view class="title font34">公告</view>
|
||||
<view class="title font34">{{ifNotice?'公告':'工地公告'}}</view>
|
||||
<view class="txt font24">
|
||||
<rich-text :nodes="notice"></rich-text>
|
||||
<rich-text :nodes="ifNotice?notice:wsNotice"></rich-text>
|
||||
</view>
|
||||
<view class="close-btn font30 color-66" @tap="closeNotice">关闭</view>
|
||||
</view>
|
||||
|
@ -104,28 +112,28 @@
|
|||
</view>
|
||||
|
||||
<!-- 注册工人信息 -->
|
||||
<view class="pop-up-bg" v-if="userInfo.checking==0 && userInfo.role==0"> <!-- v-if="userInfo.checking==0 && userInfo.role==0" -->
|
||||
<view class="pop-up-bg" v-if="ifRegister"> <!-- v-if="ifRegister" -->
|
||||
<view class="register-information font24 bg-white">
|
||||
<view class="item">
|
||||
<view class="title">姓名</view>
|
||||
<input class="input" type="text" v-model="registerObj.real_name">
|
||||
<input class="input" type="text" v-model="registerObj.real_name" placeholder="请填写姓名">
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">电话号码</view>
|
||||
<input class="input" type="number" v-model="registerObj.mobile">
|
||||
<input class="input" type="number" v-model="registerObj.mobile" placeholder="请填写电话号码">
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">身份证</view>
|
||||
<input class="input" type="text" v-model="registerObj.card_number">
|
||||
<input class="input" type="text" v-model="registerObj.card_number" placeholder="请填写身份证号码">
|
||||
</view>
|
||||
<view class="item item-other" style="align-items: flex-start;">
|
||||
<view class="title" style="margin-top: 18rpx;">身份证正面</view>
|
||||
<view class="upload-box">
|
||||
<view class="img" v-if="idImgList[0]!==''" @tap.stop="previewImage(idImgList[0])">
|
||||
<image :src="idImgList[0]" mode="widthFix"></image>
|
||||
<view class="img" v-if="registerObj.id_front!==''" @tap.stop="previewImage(registerObj.id_front)">
|
||||
<image :src="registerObj.id_front" mode="widthFix"></image>
|
||||
<image class="del-btn" src="/static/icon/icon-del.png" mode="widthFix" @tap.stop="delImg(index,'positive')"></image>
|
||||
</view>
|
||||
<view class="upload-btn" @tap="changeImg('positive')" v-if="idImgList[0]==''">
|
||||
<view class="upload-btn" @tap="changeImg('positive')" v-else>
|
||||
<view class="bg">
|
||||
<image src="/static/id-front.jpg" mode="aspectFill"></image>
|
||||
</view>
|
||||
|
@ -139,11 +147,11 @@
|
|||
<view class="item item-other" style="align-items: flex-start;">
|
||||
<view class="title" style="margin-top: 18rpx;">身份证反面</view>
|
||||
<view class="upload-box">
|
||||
<view class="img" v-if="idImgList[1]!==''" @tap.stop="previewImage(idImgList[1])">
|
||||
<image :src="idImgList[1]" mode="widthFix"></image>
|
||||
<view class="img" v-if="registerObj.id_back!==''" @tap.stop="previewImage(registerObj.id_back)">
|
||||
<image :src="registerObj.id_back" mode="widthFix"></image>
|
||||
<image class="del-btn" src="/static/icon/icon-del.png" mode="widthFix" @tap.stop="delImg(index,'back')"></image>
|
||||
</view>
|
||||
<view class="upload-btn" @tap="changeImg('back')" v-if="idImgList[1]==''">
|
||||
<view class="upload-btn" @tap="changeImg('back')" v-else>
|
||||
<view class="bg">
|
||||
<image src="/static/id-back.jpg" mode="aspectFill"></image>
|
||||
</view>
|
||||
|
@ -162,39 +170,43 @@
|
|||
<image src="/static/icon/icon-arrow-01.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">证件名称</view>
|
||||
<input class="input" type="text" v-model="registerObj.certificate" placeholder="请填写证件名称">
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">工资</view>
|
||||
<input class="input" type="number" v-model="registerObj.pay">
|
||||
<input class="input" type="number" v-model="registerObj.pay" placeholder="请填写工资">
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">紧急联系人</view>
|
||||
<input class="input" type="text" v-model="registerObj.emergency_contact">
|
||||
<input class="input" type="text" v-model="registerObj.emergency_contact" placeholder="请填写紧急联系人">
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">联系人电话</view>
|
||||
<input class="input" type="number" v-model="registerObj.emergency_phone">
|
||||
<input class="input" type="number" v-model="registerObj.emergency_phone" placeholder="请填写联系人电话">
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">银行卡户名</view>
|
||||
<input class="input" type="text" v-model="registerObj.bank_card_name">
|
||||
<input class="input" type="text" v-model="registerObj.bank_card_name" placeholder="请填写银行卡户名">
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">银行卡号</view>
|
||||
<input class="input" type="number" v-model="registerObj.bank_card_number">
|
||||
<input class="input" type="number" v-model="registerObj.bank_card_number" placeholder="请填写银行卡号">
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">开户行</view>
|
||||
<input class="input" type="text" v-model="registerObj.bank_name">
|
||||
<input class="input" type="text" v-model="registerObj.bank_name" placeholder="请填写开户行">
|
||||
</view>
|
||||
<view class="item item-other" style="align-items: flex-start;">
|
||||
<view class="title" style="margin-top: 18rpx;">银行卡拍照</view>
|
||||
<view class="upload-box">
|
||||
<view class="img" v-if="registerObj.bank_img!==''" @tap.stop="previewImage(registerObj.bank_img)">
|
||||
<image :src="registerObj.bank_img" mode="widthFix"></image>
|
||||
<view class="img" v-if="registerObj.bank_card_img!==''" @tap.stop="previewImage(registerObj.bank_card_img)">
|
||||
<image :src="registerObj.bank_card_img" mode="widthFix"></image>
|
||||
<image class="del-btn" src="/static/icon/icon-del.png" mode="widthFix" @tap.stop="delImg(index,'bank')"></image>
|
||||
</view>
|
||||
<view class="upload-btn" @tap="changeImg('bank')" v-if="registerObj.bank_img==''">
|
||||
<view class="upload-btn" @tap="changeImg('bank')" v-if="registerObj.bank_card_img==''">
|
||||
<view class="bg">
|
||||
<image src="/static/bank.jpg" mode="aspectFill"></image>
|
||||
</view>
|
||||
|
@ -207,7 +219,7 @@
|
|||
</view>
|
||||
<view class="item item-other" style="align-items: flex-start;">
|
||||
<view class="title" style="margin-top: 18rpx;">工作经验</view>
|
||||
<textarea class="input textarea" v-model="registerObj.experience"></textarea>
|
||||
<textarea class="input textarea" v-model="registerObj.work_experience" placeholder="请填写工作经验"></textarea>
|
||||
</view>
|
||||
<view class="item item-other" style="align-items: flex-start;">
|
||||
<view class="title" style="margin-top: 18rpx;">现住地址</view>
|
||||
|
@ -215,23 +227,26 @@
|
|||
<picker mode="region" @change="changeAddress">
|
||||
<view class="addr-input">
|
||||
<view class="input-box">
|
||||
<input class="input-flex clips1" type="text" v-model="province" disabled="true">
|
||||
<input class="input-flex clips1" type="text" v-model="registerObj.province" disabled="true">
|
||||
<image src="/static/icon/icon-arrow-01.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="input-box">
|
||||
<input class="input-flex clips1" type="text" v-model="city" disabled="true">
|
||||
<input class="input-flex clips1" type="text" v-model="registerObj.city" disabled="true">
|
||||
<image src="/static/icon/icon-arrow-01.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="input-box">
|
||||
<input class="input-flex clips1" type="text" v-model="county" disabled="true">
|
||||
<input class="input-flex clips1" type="text" v-model="registerObj.area" disabled="true">
|
||||
<image src="/static/icon/icon-arrow-01.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</picker>
|
||||
<input class="input" type="text" v-model="registerObj.address" placeholder="请填写详细地址">
|
||||
<input class="input" type="text" v-model="registerObj.address_now" placeholder="请填写详细地址">
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-btn bg-blue color-white font30" @tap="submitRegister">提交</view>
|
||||
<view class="register-btns color-white font30">
|
||||
<view class="btn cancel-btn bg-99" @tap="cancelRegister">取消</view>
|
||||
<view class="btn submit-btn bg-blue" @tap="submitRegister">提交</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
@ -255,10 +270,10 @@
|
|||
backgroudColor:'none', //导航栏背景
|
||||
titleColor:'#ffffff', //导航栏颜色
|
||||
radioList:[
|
||||
{title:'上午上班打卡',type:'in'},
|
||||
{title:'上午下班打卡',type:'out'},
|
||||
{title:'下午上班打卡',type:'in'},
|
||||
{title:'下午下班打卡',type:'out'}
|
||||
{title:'上午上班',type:'morning_on'},
|
||||
{title:'上午下班',type:'morning_off'},
|
||||
{title:'下午上班',type:'afternoon_on'},
|
||||
{title:'下午下班',type:'afternoon_off'}
|
||||
],//打卡类型
|
||||
radioIndex:0, //当前选择
|
||||
showRadio:false, //是否显示上班类型
|
||||
|
@ -285,14 +300,18 @@
|
|||
bank_card_number:'',
|
||||
bank_name:'',
|
||||
worksite_id:-1,
|
||||
experience:'',
|
||||
address:'',
|
||||
bank_img:'',
|
||||
work_experience:'',
|
||||
address_now:'',
|
||||
bank_card_img:'',
|
||||
id_front:'',
|
||||
id_back:'',
|
||||
certificate:'',
|
||||
province:'北京市', //省
|
||||
city:'北京市', //市
|
||||
area:'东城区',//区
|
||||
}, //工人注册信息
|
||||
idImgList:['',''], //身份证照片
|
||||
positionList:[], //技术岗位
|
||||
positionIndex:0, //当前技术岗位
|
||||
finish:false, //是否完成打卡
|
||||
positionIndex:0, //当前技术岗位
|
||||
flag:true, //是否能提交
|
||||
isLoding:false, //是否加载完成
|
||||
timer:false, //计时器状态
|
||||
|
@ -300,11 +319,11 @@
|
|||
isNotice:false, //是否显示通知
|
||||
notice:'', //公告
|
||||
ifNotice:false, //是否显示公告
|
||||
wsNotice:'', //工地公告
|
||||
ifWsNotice:false,// 是否显示工地公告
|
||||
stagingImg:'', //暂存img
|
||||
|
||||
province:'北京市', //省
|
||||
city:'北京市', //市
|
||||
county:'东城区',//区
|
||||
ifRegister:false, //是否显示注册表
|
||||
buttonColor:'',//打卡按钮颜色
|
||||
}
|
||||
},
|
||||
onPageScroll(object){
|
||||
|
@ -328,22 +347,17 @@
|
|||
this.userType = op.userType;
|
||||
}
|
||||
if(op.apply=='join'){
|
||||
// 获取用户信息
|
||||
this.getUserInfo();
|
||||
// 显示注册表
|
||||
this.ifRegister = true;
|
||||
}
|
||||
// 获取用户信息
|
||||
this.getUserInfo();
|
||||
// 改变状态栏
|
||||
this.changeStatusNav();
|
||||
// 获取位置信息
|
||||
this.getLocationEv(0);
|
||||
// 判断是否查看安全公告
|
||||
if(uni.getStorageSync('isRead')){
|
||||
// 查询是否有通知
|
||||
this.getNoticeInfo();
|
||||
}else{
|
||||
this.isRead = false;
|
||||
// 获取安全告知
|
||||
this.getSafetyBulletin();
|
||||
}
|
||||
// 获取工作岗位
|
||||
this.getPositionList();
|
||||
},
|
||||
onShow() {
|
||||
// 获取打卡信息
|
||||
|
@ -351,10 +365,6 @@
|
|||
// 获取打卡记录
|
||||
this.getSignList();
|
||||
},
|
||||
onHide() {
|
||||
// 缓存公告为未读
|
||||
uni.setStorageSync('ifNotice','notNotice');
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
let shareObj = {
|
||||
title:'工地打卡',
|
||||
|
@ -382,43 +392,83 @@
|
|||
// 获取用户信息
|
||||
getUserInfo(){
|
||||
this.$requst.post('/api/v1/user/info').then(res=>{
|
||||
if(res.code==0){
|
||||
console.log(res,'用户信息');
|
||||
if(res.code==0){
|
||||
console.log(res,'用户信息')
|
||||
this.userInfo = res.data;
|
||||
// 获取技术岗位
|
||||
if(this.userInfo.checking==0 && this.userInfo.role==0){
|
||||
this.getPositionList();
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 选择省市区
|
||||
changeAddress(e){
|
||||
this.province = e.detail.value[0];
|
||||
this.city = e.detail.value[1];
|
||||
this.county = e.detail.value[2];
|
||||
this.registerObj.province = e.detail.value[0];
|
||||
this.registerObj.city = e.detail.value[1];
|
||||
this.registerObj.area = e.detail.value[2];
|
||||
},
|
||||
|
||||
// 获取公告
|
||||
getNotice(){
|
||||
this.$requst.get('/api/v1/index/notice').then(res=>{
|
||||
if(res.code==0){
|
||||
console.log(res,'公告');
|
||||
if(res.data.status==1){
|
||||
this.ifNotice = true;
|
||||
uni.setStorageSync('ifNotice','hasNotice');
|
||||
this.notice = res.data.content;
|
||||
}else{
|
||||
this.ifNotice = false;
|
||||
// 授权位置信息
|
||||
getLocationEv(type){
|
||||
uni.getLocation({
|
||||
type: 'gcj02',
|
||||
isHighAccuracy:'true',
|
||||
success: (res)=>{
|
||||
console.log(res,'位置信息');
|
||||
if(type=='1'){
|
||||
this.$toolAll.tools.showToast('重新定位成功');
|
||||
}
|
||||
//获取工地列表
|
||||
this.getSiteEv(res.longitude,res.latitude);
|
||||
},
|
||||
complete: ()=>{
|
||||
// 判断是否查看安全公告
|
||||
if(uni.getStorageSync('readSafeNotice')){
|
||||
// 查询是否有通知
|
||||
this.getNoticeInfo();
|
||||
}else{
|
||||
this.isRead = false;
|
||||
// 获取安全告知
|
||||
this.getSafetyBulletin();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//获取工地列表
|
||||
getSiteEv(lng,lat){
|
||||
this.$requst.get('/api/v1/common/get-current-worksite',{lng:lng,lat:lat}).then(res=>{
|
||||
if(res.code == 0){
|
||||
console.log(res,'定位工地信息');
|
||||
// 缓存工地id
|
||||
uni.setStorageSync('worksite_id',res.data.id);
|
||||
this.siteInfo = res.data;
|
||||
this.registerObj.worksite_id = res.data.id;
|
||||
this.isLoding = true;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 关闭公告
|
||||
closeNotice(){
|
||||
this.ifNotice = false;
|
||||
// 获取安全告知
|
||||
getSafetyBulletin(){
|
||||
if(!this.readSafeNotice){
|
||||
this.$requst.get('/api/v1/index/safe-notice').then(res=>{
|
||||
if(res.code == 0){
|
||||
console.log(res,'安全告知');
|
||||
this.safetyBulletin = res.data.content;
|
||||
}
|
||||
})
|
||||
}else{
|
||||
// 查询是否有通知
|
||||
this.getNoticeInfo();
|
||||
}
|
||||
},
|
||||
|
||||
// 关闭安全告知
|
||||
closeSafetyBulletin(){
|
||||
this.isRead = true;
|
||||
// 缓存是否已读
|
||||
uni.setStorageSync('readSafeNotice',true);
|
||||
// 查询是否有通知
|
||||
this.getNoticeInfo();
|
||||
},
|
||||
|
||||
// 查询是否有通知
|
||||
|
@ -430,30 +480,79 @@
|
|||
this.isNotice = true;
|
||||
this.noticeInfo = res.data;
|
||||
}else{
|
||||
this.isNotice = false;
|
||||
// 判断是否已经查看公告
|
||||
if(uni.getStorageSync('ifNotice')!=='hasNotice'){
|
||||
// 获取公告
|
||||
this.getNotice();
|
||||
}
|
||||
// 获取公告
|
||||
this.getNotice();
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 关闭通知
|
||||
closeEdit(){
|
||||
this.isNotice = false;
|
||||
// 判断是否已经查看公告
|
||||
if(uni.getStorageSync('ifNotice')!=='hasNotice'){
|
||||
// 获取公告
|
||||
this.getNotice();
|
||||
}
|
||||
// 获取公告
|
||||
this.getNotice();
|
||||
},
|
||||
|
||||
// 修改审核资料
|
||||
editEv(){
|
||||
// 获取用户信息
|
||||
this.getUserInfo();
|
||||
this.isNotice = false;
|
||||
// 显示注册表
|
||||
this.ifRegister = true;
|
||||
// 查询审核资料
|
||||
this.getCheckDetail();
|
||||
},
|
||||
|
||||
// 获取公告
|
||||
getNotice(){
|
||||
this.$requst.get('/api/v1/index/notice').then(res=>{
|
||||
if(res.code==0){
|
||||
console.log(res,'公告');
|
||||
if(res.data.status==1){
|
||||
if(uni.getStorageSync('noticeVersion')!==res.data.version){
|
||||
this.ifNotice = true;
|
||||
uni.setStorageSync('noticeVersion',res.data.version);
|
||||
this.notice = res.data.content;
|
||||
}else{
|
||||
// 获取工地公告
|
||||
this.getWorksiteNotice();
|
||||
}
|
||||
}else{
|
||||
// 获取工地公告
|
||||
this.getWorksiteNotice();
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 关闭公告||安全公告
|
||||
closeNotice(){
|
||||
if(!this.ifWsNotice){
|
||||
this.ifNotice = false;
|
||||
// 获取工地公告
|
||||
this.getWorksiteNotice();
|
||||
}else{
|
||||
this.ifWsNotice = false;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
// 获取工地公告
|
||||
getWorksiteNotice(){
|
||||
this.$requst.get('/api/v1/index/worksite-notice',{worksite_id:this.registerObj.worksite_id}).then(res=>{
|
||||
if(res.code==0){
|
||||
console.log(res,'工地公告');
|
||||
if(res.data.status==1){
|
||||
if(uni.getStorageSync('wsNoticeVersion')!==res.data.version){
|
||||
this.ifWsNotice = true;
|
||||
uni.setStorageSync('wsNoticeVersion',res.data.version);
|
||||
this.wsNotice = res.data.content;
|
||||
}
|
||||
// 查询审核资料
|
||||
this.getCheckDetail()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查询审核资料
|
||||
|
@ -461,90 +560,13 @@
|
|||
this.$requst.get('/api/v1/worker/check-detail',{id:this.noticeInfo.id}).then(res=>{
|
||||
if(res.code==0){
|
||||
console.log(res,'审核资料');
|
||||
this.registerObj = res.data;
|
||||
this.positionIndex = this.positionList.findIndex(item=> item.id === res.data.position);
|
||||
this.registerObj = {
|
||||
real_name:res.data.real_name,
|
||||
mobile:res.data.mobile,
|
||||
card_number:res.data.card_number,
|
||||
pay:parseFloat(res.data.pay),
|
||||
position:res.data.position,
|
||||
emergency_contact:res.data.emergency_contact,
|
||||
emergency_phone:res.data.emergency_phone,
|
||||
bank_card_name:res.data.bank_card_name,
|
||||
bank_card_number:res.data.bank_card_number,
|
||||
bank_name:res.data.bank_name,
|
||||
worksite_id:res.data.worksite_id
|
||||
}
|
||||
this.registerObj.pay = parseFloat(res.data.pay);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 授权位置信息
|
||||
getLocationEv(type){
|
||||
uni.getLocation({
|
||||
type: 'gcj02',
|
||||
isHighAccuracy:'true',
|
||||
success: (res)=>{
|
||||
console.log(res,'位置信息');
|
||||
if(type=='1'){
|
||||
this.$toolAll.tools.showToast('重新定位成功');
|
||||
}
|
||||
//获取工地列表
|
||||
this.getSiteEv(res.longitude,res.latitude);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//获取工地列表
|
||||
getSiteEv(lng,lat){
|
||||
this.$requst.get('/api/v1/common/get-current-worksite',{lng:lng,lat:lat}).then(res=>{
|
||||
if(res.code == 0){
|
||||
console.log(res,'定位工地信息');
|
||||
// 缓存工地id
|
||||
uni.setStorageSync('worksite_id',res.data.id);
|
||||
this.siteInfo = res.data;
|
||||
this.registerObj.worksite_id = res.data.id;
|
||||
this.isLoding = true;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取安全告知
|
||||
getSafetyBulletin(){
|
||||
if(!this.isRead){
|
||||
this.$requst.get('/api/v1/index/safe-notice').then(res=>{
|
||||
if(res.code == 0){
|
||||
console.log(res,'安全公告');
|
||||
this.safetyBulletin = res.data.content;
|
||||
}
|
||||
})
|
||||
}else{
|
||||
// 判断是否已经查看公告
|
||||
if(uni.getStorageSync('ifNotice')!=='hasNotice'){
|
||||
// 获取公告
|
||||
this.getNotice();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 关闭安全公告
|
||||
closeSafetyBulletin(){
|
||||
this.isRead = true;
|
||||
// 缓存是否已读
|
||||
uni.setStorageSync('isRead',this.isRead);
|
||||
if(uni.getStorageSync('worker_role')==0){
|
||||
this.$toolAll.tools.showToast('请先登录授权');
|
||||
setTimeout(()=>{
|
||||
uni.navigateTo({
|
||||
url:'/pages/login/login'
|
||||
})
|
||||
},2000)
|
||||
}else{
|
||||
// 查询是否有通知
|
||||
this.getNoticeInfo();
|
||||
}
|
||||
},
|
||||
|
||||
// 获取技术岗位
|
||||
getPositionList(){
|
||||
this.$requst.get('/api/v1/common/position-list').then(res=>{
|
||||
|
@ -573,9 +595,9 @@
|
|||
let params = this.registerObj;
|
||||
this.$requst.post('/api/v1/worker/register',params).then(res=>{
|
||||
if(res.code == 0){
|
||||
this.$toolAll.tools.showToast('提交成功');
|
||||
// 查询是否有通知
|
||||
this.getNoticeInfo();
|
||||
this.$toolAll.tools.showToast('提交成功');
|
||||
// 隐藏注册表
|
||||
this.ifRegister = false;
|
||||
setTimeout(()=>{
|
||||
this.flag = true;
|
||||
},2000)
|
||||
|
@ -587,6 +609,19 @@
|
|||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 取消注册
|
||||
cancelRegister(){
|
||||
// 隐藏注册表
|
||||
uni.navigateBack({
|
||||
delta: 1 ,// 返回的页面数
|
||||
fail: () => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/pagehome/pagehome'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 验证电话号
|
||||
|
@ -611,8 +646,6 @@
|
|||
this.currentWeek = res.data.info.week;
|
||||
// 获取当前时间
|
||||
this.currenTime = res.data.info.now;
|
||||
// 获取打卡记录列表
|
||||
this.signList = res.data.list;
|
||||
// 服务端时间处理
|
||||
this.setIntervalEv();
|
||||
}
|
||||
|
@ -650,10 +683,12 @@
|
|||
},
|
||||
|
||||
// 获取打卡记录
|
||||
getSignList(){
|
||||
getSignList(){
|
||||
this.$requst.get('/api/v1/user/sign-today').then(res=>{
|
||||
if(res.code == 0){
|
||||
console.log(res,'打卡记录');
|
||||
console.log(res,'打卡记录');
|
||||
// 获取打卡状态
|
||||
this.buttonColor = res.data.buttonColor;
|
||||
// 获取打卡记录列表
|
||||
this.signList = res.data.list;
|
||||
}
|
||||
|
@ -662,23 +697,24 @@
|
|||
|
||||
// 唤起打卡弹窗
|
||||
showRadioEv(){
|
||||
if(this.siteInfo.name){
|
||||
if(!this.finish){
|
||||
if(this.userInfo.role!==0){
|
||||
if(this.siteInfo.name){
|
||||
this.showRadio = true;
|
||||
this.radioIndex = 0;
|
||||
}else{
|
||||
this.$toolAll.tools.showToast('您已打卡');
|
||||
this.$toolAll.tools.showToast('不在打卡范围内');
|
||||
}
|
||||
}else{
|
||||
this.$toolAll.tools.showToast('不在打卡范围内');
|
||||
}
|
||||
},
|
||||
this.showRadio = true;
|
||||
this.radioIndex = 0;
|
||||
}
|
||||
},
|
||||
|
||||
// 改变上下班打卡
|
||||
changeSignType(index){
|
||||
changeSignType(index){
|
||||
if(this.radioIndex !== index){
|
||||
this.radioIndex = index;
|
||||
}
|
||||
this.radioIndex = index;
|
||||
}
|
||||
},
|
||||
|
||||
// 打卡
|
||||
|
@ -689,16 +725,13 @@
|
|||
lng:this.siteInfo.lng,
|
||||
worksite_id:this.siteInfo.id
|
||||
}
|
||||
this.$requst.post('/api/v1/worker/sign',params).then(res=>{
|
||||
this.$requst.post('/api/v1/user/sign',params).then(res=>{
|
||||
if(res.code==0){
|
||||
this.finish = true;
|
||||
this.showRadio = false;
|
||||
// 获取打卡记录
|
||||
this.getSignList();
|
||||
// 延时改变打卡状态
|
||||
setTimeout(()=>{
|
||||
this.finish = false;
|
||||
},60000)
|
||||
this.getSignList();
|
||||
// 获取状态列表
|
||||
this.$refs.signCalendar.getStatusObj();
|
||||
}else{
|
||||
this.$toolAll.tools.showToast(res.msg);
|
||||
}
|
||||
|
@ -726,13 +759,13 @@
|
|||
this.$requst.upload('/api/v1/file/upload/image',{path:this.stagingImg}).then(res=>{
|
||||
if(res.code==0) {
|
||||
if(type=='positive'){
|
||||
this.idImgList[0] = this.$hostHttp+res.data.src;
|
||||
this.registerObj.id_front = `${getApp().globalData.hostapi}`+res.data.src;
|
||||
}
|
||||
if(type=='back'){
|
||||
this.idImgList[1] = this.$hostHttp+res.data.src;
|
||||
this.registerObj.id_back = `${getApp().globalData.hostapi}`+res.data.src;
|
||||
}
|
||||
if(type=='bank'){
|
||||
this.registerObj.bank_img = this.$hostHttp+res.data.src;
|
||||
this.registerObj.bank_card_img = `${getApp().globalData.hostapi}`+res.data.src;
|
||||
}
|
||||
}
|
||||
uni.hideLoading();
|
||||
|
@ -742,13 +775,13 @@
|
|||
// 删除图片
|
||||
delImg(index,type){
|
||||
if(type=='positive'){
|
||||
this.idImgList[0] = '';
|
||||
this.registerObj.id_front = '';
|
||||
}
|
||||
if(type=='back'){
|
||||
this.idImgList[1] = '';
|
||||
this.registerObj.id_back = '';
|
||||
}
|
||||
if(type=='bank'){
|
||||
this.registerObj.bank_img = '';
|
||||
this.registerObj.bank_card_img = '';
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -18,50 +18,132 @@
|
|||
<view class="msg font24">{{userInfo.nickname}}</view>
|
||||
<image src="/static/icon/icon-arrow-03.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="item" @tap="editEv(1,'position')">
|
||||
<view class="item" v-if="userInfo.role==1">
|
||||
<view class="title">技术岗位</view>
|
||||
<view class="msg font24">{{userInfo.position_name}}<text class="director-arrow" v-if="userInfo.check_info.status!==1 && userInfo.position_name!==userInfo.check_info.position_name">{{userInfo.check_info.position_name}}</text></view>
|
||||
<view class="msg picker-msg font24">
|
||||
{{userInfo.position_name}}
|
||||
<text class="director-arrow" v-if="userInfo.check_info.status!==1 && userInfo.position_name!==userInfo.check_info.position_name">{{userInfo.check_info.position_name}}</text>
|
||||
<picker mode="selector" :range="positionList" @change="bindPositionChange" :value="positionIndex" :range-key="'name'">
|
||||
<view class="name">
|
||||
<text class="font26">{{positionList[positionIndex].name}}</text>
|
||||
<image src="/static/icon/icon-arrow-02.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<image src="/static/icon/icon-arrow-03.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="item" @tap="editEv(12,'certificate')" v-if="userInfo.role==1">
|
||||
<view class="title">证书名称</view>
|
||||
<view class="msg font24">{{userInfo.certificate}}</view>
|
||||
<image src="/static/icon/icon-arrow-03.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="item" @tap="editEv(2,'pay')">
|
||||
<view class="item" @tap="editEv(2,'pay')" v-if="userInfo.role==1">
|
||||
<view class="title">工资</view>
|
||||
<view class="msg font24">{{userInfo.pay}}<text class="director-arrow" v-if="userInfo.check_info.status!==1 && userInfo.pay!==userInfo.check_info.pay">{{userInfo.check_info.pay}}</text></view>
|
||||
<image src="/static/icon/icon-arrow-03.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="item" @tap="editEv(3,'real_name')">
|
||||
<view class="item" @tap="editEv(3,'real_name')" v-if="userInfo.role==1">
|
||||
<view class="title">姓名</view>
|
||||
<view class="msg font24">{{userInfo.real_name}}<text class="director-arrow" v-if="userInfo.check_info.status!==1 && userInfo.real_name!==userInfo.check_info.real_name">{{userInfo.check_info.real_name}}</text></view>
|
||||
<image src="/static/icon/icon-arrow-03.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="item" @tap="editEv(4,'mobile')">
|
||||
<view class="item" @tap="editEv(4,'mobile')" v-if="userInfo.role==1">
|
||||
<view class="title">电话号码</view>
|
||||
<view class="msg font24">{{userInfo.mobile}}<text class="director-arrow" v-if="userInfo.check_info.status!==1 && userInfo.mobile!==userInfo.check_info.mobile">{{userInfo.check_info.mobile}}</text></view>
|
||||
<image src="/static/icon/icon-arrow-03.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="item" @tap="editEv(10,'card_number')" v-if="userInfo.role==1">
|
||||
<view class="title">身份证号</view>
|
||||
<view class="msg font24">{{userInfo.card_number}}<text class="director-arrow" v-if="userInfo.check_info.status!==1 && userInfo.card_number!==userInfo.check_info.card_number">{{userInfo.check_info.card_number}}</text></view>
|
||||
<image src="/static/icon/icon-arrow-03.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="item" v-if="userInfo.role==1">
|
||||
<view class="title">身份证正面</view>
|
||||
<view class="msg font24" @tap="changeImg('positive')">
|
||||
<image :src="userInfo.id_front" mode="widthFix"></image>
|
||||
<view class="director-arrow" v-if="userInfo.check_info.status!==1 && userInfo.id_front!==userInfo.check_info.id_front">
|
||||
<image :src="userInfo.check_info.id_front" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<image src="/static/icon/icon-arrow-03.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="item" v-if="userInfo.role==1">
|
||||
<view class="title">身份证反面</view>
|
||||
<view class="msg font24" @tap="changeImg('back')">
|
||||
<image :src="userInfo.id_back" mode="widthFix"></image>
|
||||
<text class="director-arrow" v-if="userInfo.check_info.status!==1 && userInfo.id_back!==userInfo.check_info.id_back">
|
||||
<image :src="userInfo.check_info.id_back" mode="widthFix"></image>
|
||||
</text>
|
||||
</view>
|
||||
<image src="/static/icon/icon-arrow-03.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="item" @tap="editEv(5,'emergency_contact')">
|
||||
<view class="item" @tap="editEv(5,'emergency_contact')" v-if="userInfo.role==1">
|
||||
<view class="title">紧急联系人</view>
|
||||
<view class="msg font24">{{userInfo.emergency_contact}}<text class="director-arrow" v-if="userInfo.check_info.status!==1 && userInfo.emergency_contact!==userInfo.check_info.emergency_contact">{{userInfo.check_info.emergency_contact}}</text></view>
|
||||
<image src="/static/icon/icon-arrow-03.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="item" @tap="editEv(6,'emergency_phone')">
|
||||
<view class="item" @tap="editEv(6,'emergency_phone')" v-if="userInfo.role==1">
|
||||
<view class="title">联系人电话</view>
|
||||
<view class="msg font24">{{userInfo.emergency_phone}}<text class="director-arrow" v-if="userInfo.check_info.status!==1 && userInfo.emergency_phone!==userInfo.check_info.emergency_phone">{{userInfo.check_info.emergency_phone}}</text></view>
|
||||
<image src="/static/icon/icon-arrow-03.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="item" @tap="editEv(7,'bank_card_name')">
|
||||
<view class="item" @tap="editEv(7,'bank_card_name')" v-if="userInfo.role==1">
|
||||
<view class="title">银行卡姓名</view>
|
||||
<view class="msg font24">{{userInfo.bank_card_name}}<text class="director-arrow" v-if="userInfo.check_info.status!==1 && userInfo.bank_card_name!==userInfo.check_info.bank_card_name">{{userInfo.check_info.bank_card_name}}</text></view>
|
||||
<image src="/static/icon/icon-arrow-03.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="item" @tap="editEv(8,'bank_card_number')">
|
||||
<view class="item" @tap="editEv(8,'bank_card_number')" v-if="userInfo.role==1">
|
||||
<view class="title">银行卡账号</view>
|
||||
<view class="msg font24">{{userInfo.bank_card_number}}<text class="director-arrow" v-if="userInfo.check_info.status!==1 && userInfo.bank_card_number!==userInfo.check_info.bank_card_number">{{userInfo.check_info.bank_card_number}}</text></view>
|
||||
<image src="/static/icon/icon-arrow-03.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="item" @tap="editEv(9,'bank_name')">
|
||||
<view class="item" @tap="editEv(9,'bank_name')" v-if="userInfo.role==1">
|
||||
<view class="title">开户行</view>
|
||||
<view class="msg font24">{{userInfo.bank_name}}<text class="director-arrow" v-if="userInfo.check_info.status!==1 && userInfo.bank_name!==userInfo.check_info.bank_name">{{userInfo.check_info.bank_name}}</text></view>
|
||||
<image src="/static/icon/icon-arrow-03.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="item" v-if="userInfo.role==1">
|
||||
<view class="title">银行卡照片</view>
|
||||
<view class="msg font24" @tap="changeImg('bank')">
|
||||
<image :src="userInfo.bank_card_img" mode="widthFix"></image>
|
||||
<view class="director-arrow" v-if="userInfo.check_info.status!==1 && userInfo.bank_card_img!==userInfo.check_info.bank_card_img">
|
||||
<image :src="userInfo.check_info.bank_card_img" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<image src="/static/icon/icon-arrow-03.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="item" @tap="editEv(11,'work_experience')" v-if="userInfo.role==1">
|
||||
<view class="title">工作经验</view>
|
||||
<view class="msg font24">{{userInfo.work_experience}}</view>
|
||||
<image src="/static/icon/icon-arrow-03.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="item" v-if="userInfo.role==1">
|
||||
<view class="title">现住地址</view>
|
||||
<view class="msg picker-msg font24">
|
||||
{{userInfo.province}}{{userInfo.city}}{{userInfo.area}}
|
||||
<picker mode="region" @change="changeAddress">
|
||||
<view class="addr-input">
|
||||
<view class="input-box">
|
||||
<input class="input-flex clips1" type="text" v-model="userInfo.province" disabled="true">
|
||||
<image src="/static/icon/icon-arrow-01.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="input-box">
|
||||
<input class="input-flex clips1" type="text" v-model="userInfo.city" disabled="true">
|
||||
<image src="/static/icon/icon-arrow-01.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="input-box">
|
||||
<input class="input-flex clips1" type="text" v-model="userInfo.area" disabled="true">
|
||||
<image src="/static/icon/icon-arrow-01.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<image src="/static/icon/icon-arrow-03.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="item" @tap="editEv(1,'address_now')" v-if="userInfo.role==1">
|
||||
<view class="title">详细地址</view>
|
||||
<view class="msg font24">{{userInfo.address_now}}</view>
|
||||
<image src="/static/icon/icon-arrow-03.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -70,15 +152,8 @@
|
|||
<view class="edit-box bg-white">
|
||||
<image class="close-btn" src="/static/icon/icon-close-btn.png" mode="aspectFit" @tap="closeEdit"></image>
|
||||
<view class="title font36">{{editTitle}}</view>
|
||||
<!-- 技术岗位显示 -->
|
||||
<picker class="input picker-input" v-if="field=='position'" mode="selector" :range="positionList" @change="bindPositionChange" :value="positionIndex" :range-key="'name'">
|
||||
<view class="name">
|
||||
<text class="font26">{{positionList[positionIndex].name}}</text>
|
||||
<image src="/static/icon/icon-arrow-02.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
</picker>
|
||||
<!-- 其他显示 -->
|
||||
<input class="input font26" v-else type="text" v-model="editMsg" :placeholder="`请输入${editTitle}`" placeholder-style="color:rgba(51,51,51,.4)">
|
||||
<input class="input font26" type="text" v-model="editMsg" :placeholder="`请输入${editTitle}`" placeholder-style="color:rgba(51,51,51,.4)">
|
||||
<view class="submit-btn font30 color-white" @tap="submitEv">提交</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -128,7 +203,8 @@
|
|||
if(res.code==0){
|
||||
console.log(res,'用户信息');
|
||||
this.userInfo = res.data;
|
||||
this.isLoding = true;
|
||||
this.isLoding = true;
|
||||
this.positionIndex = this.positionList.findIndex(item=> item.id === res.data.position);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -145,21 +221,27 @@
|
|||
|
||||
// 选择技术岗位
|
||||
bindPositionChange(e){
|
||||
this.positionIndex = e.detail.value;
|
||||
this.positionIndex = e.detail.value;
|
||||
this.field = 'position';
|
||||
this.editMsg = this.positionList[this.positionIndex].id;
|
||||
setTimeout(()=>{
|
||||
// 提交修改
|
||||
this.submitEv();
|
||||
},200)
|
||||
},
|
||||
|
||||
// 打开修改弹窗
|
||||
editEv(num,type){
|
||||
editEv(num,type){
|
||||
this.ifShow = true;
|
||||
this.field = type;
|
||||
this.field = type;
|
||||
switch (num){
|
||||
case 0:
|
||||
this.editTitle = '昵称';
|
||||
this.editMsg = this.userInfo.nickname;
|
||||
break;
|
||||
case 1:
|
||||
this.editTitle = '技术岗位';
|
||||
this.positionIndex = this.positionList.findIndex(item=> item.id === this.userInfo.position);
|
||||
this.editTitle = '详细地址';
|
||||
this.editMsg = this.userInfo.address_now;
|
||||
break;
|
||||
case 2:
|
||||
this.editTitle = '工资';
|
||||
|
@ -192,6 +274,18 @@
|
|||
case 9:
|
||||
this.editTitle = '开户行';
|
||||
this.editMsg = this.userInfo.bank_name;
|
||||
break;
|
||||
case 10:
|
||||
this.editTitle = '身份证号';
|
||||
this.editMsg = this.userInfo.card_number;
|
||||
break;
|
||||
case 11:
|
||||
this.editTitle = '工作经验';
|
||||
this.editMsg = this.userInfo.work_experience;
|
||||
break;
|
||||
case 12:
|
||||
this.editTitle = '证书名称';
|
||||
this.editMsg = this.userInfo.certificate;
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
@ -202,6 +296,71 @@
|
|||
this.editTitle = '';
|
||||
this.field = '';
|
||||
this.editMsg= '';
|
||||
},
|
||||
|
||||
// 选择图片
|
||||
changeImg(type){
|
||||
uni.chooseImage({
|
||||
count: 1, //默认9
|
||||
sourceType: ['album','camera'], //从相册选择
|
||||
success: (res)=> {
|
||||
this.stagingImg = res.tempFilePaths[0];
|
||||
// 上传图片
|
||||
this.uploadImg(type);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 上传图片
|
||||
uploadImg(type){
|
||||
uni.showLoading({
|
||||
title: '上传中'
|
||||
});
|
||||
this.$requst.upload('/api/v1/file/upload/image',{path:this.stagingImg}).then(res=>{
|
||||
if(res.code==0) {
|
||||
if(type=='positive'){
|
||||
this.userInfo.id_front = `${getApp().globalData.hostapi}`+res.data.src;
|
||||
this.field = 'id_front';
|
||||
this.editMsg = this.userInfo.id_front;
|
||||
setTimeout(()=>{
|
||||
// 提交修改
|
||||
this.submitEv();
|
||||
},200)
|
||||
}
|
||||
if(type=='back'){
|
||||
this.userInfo.id_back = `${getApp().globalData.hostapi}`+res.data.src;
|
||||
this.field = 'id_back';
|
||||
this.editMsg = this.userInfo.id_back;
|
||||
setTimeout(()=>{
|
||||
// 提交修改
|
||||
this.submitEv();
|
||||
},200)
|
||||
}
|
||||
if(type=='bank'){
|
||||
this.userInfo.bank_card_img = `${getApp().globalData.hostapi}`+res.data.src;
|
||||
this.field = 'bank_card_img';
|
||||
this.editMsg = this.userInfo.bank_card_img;
|
||||
setTimeout(()=>{
|
||||
// 提交修改
|
||||
this.submitEv();
|
||||
},200)
|
||||
}
|
||||
}
|
||||
uni.hideLoading();
|
||||
})
|
||||
},
|
||||
|
||||
// 选择省市区
|
||||
changeAddress(e){
|
||||
this.userInfo.province = e.detail.value[0];
|
||||
this.userInfo.city = e.detail.value[1];
|
||||
this.userInfo.area = e.detail.value[2];
|
||||
this.field = 'address';
|
||||
this.editMsg = e.detail.value[0]+e.detail.value[1]+e.detail.value[2];
|
||||
setTimeout(()=>{
|
||||
// 提交修改
|
||||
this.submitEv();
|
||||
},200)
|
||||
},
|
||||
|
||||
// 提交修改
|
||||
|
@ -209,7 +368,8 @@
|
|||
let params = {
|
||||
field:this.field,
|
||||
value:this.editMsg!==""?this.editMsg:this.positionList[this.positionIndex].id
|
||||
}
|
||||
}
|
||||
console.log(params,121212)
|
||||
this.$requst.post('/api/v1/worker/update-info',params).then(res=>{
|
||||
if(res.code==0){
|
||||
this.$toolAll.tools.showToast('提交成功');
|
||||
|
@ -222,7 +382,16 @@
|
|||
this.$toolAll.tools.showToast(res.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 图片预览
|
||||
previewImageEv(url) {
|
||||
//uniapp预览轮播图
|
||||
uni.previewImage({
|
||||
current: 0, //预览图片的下标
|
||||
urls: [url] //预览图片的地址,必须要数组形式,如果不是数组形式就转换成数组形式就可以
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
</view>
|
||||
<!-- 打卡日历 -->
|
||||
<view class="sign-calendar">
|
||||
<sign-calendar></sign-calendar>
|
||||
<sign-calendar ref="signCalendar" @getDate="getDate"></sign-calendar>
|
||||
</view>
|
||||
<!-- 时间 -->
|
||||
<view class="sign-record-date font26">2022年12月08日 打卡情况</view>
|
||||
<view class="sign-record-date font26">{{curDate.substr(0,4)+'年'+curDate.substr(5,2)+'月'+curDate.substr(8,2)+'日'}} 打卡情况</view>
|
||||
<!-- 打卡记录 -->
|
||||
<view class="sign-record sign-record-other bg-white">
|
||||
<view class="item font26" v-for="(item,index) in signList" :key="index">
|
||||
|
@ -45,7 +45,7 @@
|
|||
<view class="txt font28">
|
||||
<view class="radio-item" @tap="changeSignType(index)" v-for="(item,index) in radioList" :key="index">
|
||||
<view :class="radioIndex==index?'checked':''"></view>
|
||||
<view>{{item.title}}打卡</view>
|
||||
<view>{{item.title}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 审核按钮 -->
|
||||
|
@ -62,18 +62,6 @@
|
|||
<script>
|
||||
import signCalendar from '@/components/sign-calendar/sign-calendar';
|
||||
import tabbar from '@/components/tabbar/tabbar';
|
||||
function getDate(type) {
|
||||
const date = new Date();
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
if (type === 'start') {
|
||||
year = year - 10;
|
||||
}
|
||||
month = month > 9 ? month : '0' + month;
|
||||
day = day > 9 ? day : '0' + day;
|
||||
return `${year}-${month}-${day}`;
|
||||
}
|
||||
export default {
|
||||
components:{
|
||||
signCalendar,
|
||||
|
@ -85,28 +73,34 @@
|
|||
userType:'', //账户类型 工人:worker 负责人:director
|
||||
signList:[], //打卡列表
|
||||
radioList:[
|
||||
{title:'上午上班',type:'in'},
|
||||
{title:'上午下班',type:'out'},
|
||||
{title:'下午上班',type:'in'},
|
||||
{title:'下午下班',type:'out'}
|
||||
{title:'上午上班',type:'morning_on'},
|
||||
{title:'上午下班',type:'morning_off'},
|
||||
{title:'下午上班',type:'afternoon_on'},
|
||||
{title:'下午下班',type:'afternoon_off'}
|
||||
],//打卡类型
|
||||
radioIndex:0, //当前选择
|
||||
curDate:'', //当前日期
|
||||
page:1,
|
||||
size:10,
|
||||
total:0,
|
||||
worksiteList:[], //工地列表
|
||||
worksiteIndex:-1, //当前选择
|
||||
date: getDate({format: true}),
|
||||
startDate: getDate('start'),
|
||||
beginDate:'', //开始日期
|
||||
endDate:'', //结束日期
|
||||
showCard:false, //是否显示补卡
|
||||
}
|
||||
},
|
||||
onLoad(op) {
|
||||
if(op.userType!==''){
|
||||
if(op.userType){
|
||||
this.userType = op.userType;
|
||||
}
|
||||
if(op.date){
|
||||
// 获取选择日期
|
||||
this.curDate = op.date;
|
||||
}else{
|
||||
let year = new Date().getFullYear();
|
||||
let month = new Date().getMonth() + 1;
|
||||
let day = new Date().getDate();
|
||||
this.curDate = `${year}-${month<10?'0'+month:month}-${day<10?'0'+day:day}`;
|
||||
}
|
||||
// 获取工地列表
|
||||
this.getWorksiteList();
|
||||
},
|
||||
|
@ -143,6 +137,11 @@
|
|||
this.$requst.get('/api/v1/common/worksite-list').then(res=>{
|
||||
if(res.code==0){
|
||||
this.worksiteList = res.data.list;
|
||||
if(uni.getStorageSync('worksite_id')){
|
||||
this.worksiteIndex = this.worksiteList.findIndex(item=> item.id === uni.getStorageSync('worksite_id'));
|
||||
}else{
|
||||
this.worksiteIndex = this.worksiteList.findIndex(item=> item.id === uni.getStorageSync('baseWorksiteId'));
|
||||
}
|
||||
this.isLoding = true;
|
||||
}
|
||||
})
|
||||
|
@ -155,9 +154,26 @@
|
|||
}
|
||||
},
|
||||
|
||||
// 获取选择时间
|
||||
getDate(date){
|
||||
console.log(date,'当前选择时间')
|
||||
},
|
||||
|
||||
// 确认补卡
|
||||
submitEv(){
|
||||
this.showCard = false;
|
||||
let params = {
|
||||
day:this.curDate,
|
||||
worksite_id:this.worksiteList[this.worksiteIndex].id,
|
||||
type:this.radioList[this.radioIndex].type
|
||||
}
|
||||
this.$requst.post('/api/v1/worker/replenish',params).then(res=>{
|
||||
if(res.code==0){
|
||||
this.$toolAll.tools.showToast('补卡成功');
|
||||
this.showCard = false;
|
||||
// 获取状态列表
|
||||
this.$refs.signCalendar.getStatusObj();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取打卡列表
|
||||
|
@ -186,22 +202,6 @@
|
|||
// 获取打卡列表
|
||||
this.getSignList();
|
||||
},
|
||||
|
||||
// 选择开始日期
|
||||
beginDateChange(e) {
|
||||
this.beginDate = e.detail.value;
|
||||
this.page = 1;
|
||||
// 获取打卡列表
|
||||
this.getSignList();
|
||||
},
|
||||
|
||||
// 选择结束日期
|
||||
endDateChange(e) {
|
||||
this.endDate = e.detail.value;
|
||||
this.page = 1;
|
||||
// 获取打卡列表
|
||||
this.getSignList();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -5,11 +5,15 @@
|
|||
<view class="content" :style="{'padding-top':statusHeight+50+'px'}">
|
||||
<!-- 工人信息 -->
|
||||
<view class="enter-detail font26">
|
||||
<view class="item" v-if="centerDetail.status==-1">
|
||||
<view class="title">审核状态</view>
|
||||
<view class="msg font24 color-red">已退回</view>
|
||||
</view>
|
||||
<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.account.real_name!==''?centerDetail.account.real_name:centerDetail.real_name}}
|
||||
<text class="director-arrow" v-if="centerDetail.is_register!==1 && centerDetail.status==0 && centerDetail.real_name!==centerDetail.account.real_name">
|
||||
{{centerDetail.real_name}}
|
||||
</text>
|
||||
</view>
|
||||
|
@ -17,8 +21,8 @@
|
|||
<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.account.mobile!==''?centerDetail.account.mobile:centerDetail.mobile}}
|
||||
<text class="director-arrow" v-if="centerDetail.is_register!==1 && centerDetail.status==0 && centerDetail.mobile!==centerDetail.account.mobile">
|
||||
{{centerDetail.mobile}}
|
||||
</text>
|
||||
</view>
|
||||
|
@ -26,17 +30,35 @@
|
|||
<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.account.card_number!==''?centerDetail.account.card_number:centerDetail.card_number}}
|
||||
<text class="director-arrow" v-if="centerDetail.is_register!==1 && centerDetail.status==0 && centerDetail.card_number!==centerDetail.account.card_number">
|
||||
{{centerDetail.card_number}}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item-other">
|
||||
<view class="title">身份证正面</view>
|
||||
<view class="msg">
|
||||
<image @tap="previewImageEv(centerDetail.account.id_front!==baseHttp?centerDetail.account.id_front:centerDetail.id_front)" :src="centerDetail.account.id_front!==baseHttp?centerDetail.account.id_front:centerDetail.id_front" mode="widthFix"></image>
|
||||
<text class="director-arrow" v-if="centerDetail.is_register!==1 && centerDetail.status==0 && centerDetail.id_front!==centerDetail.account.id_front">
|
||||
<image @tap="previewImageEv(centerDetail.id_front)" :src="centerDetail.id_front" mode="widthFix"></image>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item-other">
|
||||
<view class="title">身份证反面</view>
|
||||
<view class="msg">
|
||||
<image @tap="previewImageEv(centerDetail.account.id_back!==baseHttp?centerDetail.account.id_back:centerDetail.id_back)" :src="centerDetail.account.id_back!==baseHttp?centerDetail.account.id_back:centerDetail.id_back" mode="widthFix"></image>
|
||||
<text class="director-arrow" v-if="centerDetail.is_register!==1 && centerDetail.status==0 && centerDetail.id_back!==centerDetail.account.id_back">
|
||||
<image @tap="previewImageEv(centerDetail.id_back)" :src="centerDetail.id_back" mode="widthFix"></image>
|
||||
</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.account.emergency_contact!==''?centerDetail.account.emergency_contact:centerDetail.emergency_contact}}
|
||||
<text class="director-arrow" v-if="centerDetail.is_register!==1 && centerDetail.status==0 && centerDetail.emergency_contact!==centerDetail.account.emergency_contact">
|
||||
{{centerDetail.emergency_contact}}
|
||||
</text>
|
||||
</view>
|
||||
|
@ -44,8 +66,8 @@
|
|||
<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.account.emergency_phone!==''?centerDetail.account.emergency_phone:centerDetail.emergency_phone}}
|
||||
<text class="director-arrow" v-if="centerDetail.is_register!==1 && centerDetail.status==0 && centerDetail.emergency_phone!==centerDetail.account.emergency_phone">
|
||||
{{centerDetail.emergency_phone}}
|
||||
</text>
|
||||
</view>
|
||||
|
@ -53,8 +75,8 @@
|
|||
<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.account.bank_card_name!==''?centerDetail.account.bank_card_name:centerDetail.bank_card_name}}
|
||||
<text class="director-arrow" v-if="centerDetail.is_register!==1 && centerDetail.status==0 && centerDetail.bank_card_name!==centerDetail.account.bank_card_name">
|
||||
{{centerDetail.bank_card_name}}
|
||||
</text>
|
||||
</view>
|
||||
|
@ -62,8 +84,8 @@
|
|||
<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.account.bank_card_number!==''?centerDetail.account.bank_card_number:centerDetail.bank_card_number}}
|
||||
<text class="director-arrow" v-if="centerDetail.is_register!==1 && centerDetail.status==0 && centerDetail.bank_card_number!==centerDetail.account.bank_card_number">
|
||||
{{centerDetail.bank_card_number}}
|
||||
</text>
|
||||
</view>
|
||||
|
@ -71,38 +93,61 @@
|
|||
<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.account.bank_name!==''?centerDetail.account.bank_name:centerDetail.bank_name}}
|
||||
<text class="director-arrow" v-if="centerDetail.is_register!==1 && centerDetail.status==0 && centerDetail.bank_name!==centerDetail.account.bank_name">
|
||||
{{centerDetail.bank_name}}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item-other">
|
||||
<view class="title">银行卡照片</view>
|
||||
<view class="msg">
|
||||
<image @tap="previewImageEv(centerDetail.account.bank_card_img!==baseHttp?centerDetail.account.bank_card_img:centerDetail.bank_card_img)" :src="centerDetail.account.bank_card_img!==baseHttp?centerDetail.account.bank_card_img:centerDetail.bank_card_img" mode="widthFix"></image>
|
||||
<text class="director-arrow" v-if="centerDetail.is_register!==1 && centerDetail.status==0 && centerDetail.bank_card_img!==centerDetail.account.bank_card_img">
|
||||
<image @tap="previewImageEv(centerDetail.bank_card_img)" :src="centerDetail.bank_card_img" mode="widthFix"></image>
|
||||
</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.account.position_name!==''?centerDetail.account.position_name:centerDetail.position_name}}
|
||||
<text class="director-arrow" v-if="centerDetail.is_register!==1 && centerDetail.status==0 && centerDetail.position_name!==centerDetail.account.position_name">
|
||||
{{centerDetail.position_name}}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item" v-if="centerDetail.certificate!==''">
|
||||
<view class="title">证书名称</view>
|
||||
<view class="msg font24">
|
||||
{{centerDetail.certificate}}
|
||||
</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.account.pay!==''?centerDetail.account.pay:centerDetail.pay}}
|
||||
<text class="director-arrow" v-if="centerDetail.is_register!==1 && centerDetail.status==0 && centerDetail.pay!==centerDetail.account.pay">
|
||||
{{centerDetail.pay}}
|
||||
</text>元
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item-other">
|
||||
<view class="title">工作经验</view>
|
||||
<view class="msg font24">
|
||||
{{centerDetail.work_experience}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">现住地址</view>
|
||||
<view class="msg font24">
|
||||
{{centerDetail.province+centerDetail.city+centerDetail.area+centerDetail.address_now}}
|
||||
</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">
|
||||
|
@ -134,6 +179,7 @@
|
|||
return {
|
||||
statusHeight:uni.getSystemInfoSync().statusBarHeight, //状态栏高度
|
||||
userType:'director', //账户类型 工人:worker 负责人:director
|
||||
baseHttp:`${getApp().globalData.hostapi}`,
|
||||
centerDetail:{}, //工人信息
|
||||
reasonMsg:'', //退回理由
|
||||
ifReason:false, //是否退回
|
||||
|
@ -144,6 +190,9 @@
|
|||
if(op.id){
|
||||
this.id = op.id;
|
||||
}
|
||||
if(op.userType){
|
||||
this.userType = op.userType;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
// 获取工人信息
|
||||
|
@ -165,6 +214,12 @@
|
|||
if(res.code == 0){
|
||||
console.log(res,'工人信息');
|
||||
this.centerDetail = res.data;
|
||||
this.centerDetail.id_front = this.$toolAll.tools.handleImg(res.data.id_front);
|
||||
this.centerDetail.account.id_front = this.$toolAll.tools.handleImg(res.data.account.id_front);
|
||||
this.centerDetail.id_back = this.$toolAll.tools.handleImg(res.data.id_back);
|
||||
this.centerDetail.account.id_back = this.$toolAll.tools.handleImg(res.data.account.id_back);
|
||||
this.centerDetail.bank_card_img = this.$toolAll.tools.handleImg(res.data.bank_card_img);
|
||||
this.centerDetail.account.bank_card_img = this.$toolAll.tools.handleImg(res.data.account.bank_card_img);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -212,7 +267,16 @@
|
|||
closeReason(){
|
||||
this.ifReason = false;
|
||||
this.reasonMsg = '';
|
||||
}
|
||||
},
|
||||
|
||||
// 图片预览
|
||||
previewImageEv(url) {
|
||||
//uniapp预览轮播图
|
||||
uni.previewImage({
|
||||
current: 0, //预览图片的下标
|
||||
urls: [url] //预览图片的地址,必须要数组形式,如果不是数组形式就转换成数组形式就可以
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -185,9 +185,9 @@
|
|||
status:this.status
|
||||
}
|
||||
if(this.page==1) this.signList = [];
|
||||
this.$requst.post('/api/v1/manager/clock-list',params).then(res=>{
|
||||
this.$requst.post('/api/v1/manager/dimission-check-list',params).then(res=>{
|
||||
if(res.code==0){
|
||||
console.log(res,'打卡列表');
|
||||
console.log(res,'离职列表');
|
||||
this.total = res.data.total;
|
||||
let signArr = [];
|
||||
res.data.list.forEach(item=>{
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -46,9 +46,6 @@ _vue.default.prototype.$toolAll = _tools.default;
|
|||
|
||||
_vue.default.prototype.$requst = _requst.default;
|
||||
|
||||
//公共域名
|
||||
_vue.default.prototype.$hostHttp = 'https://building.scdxtc.cn';
|
||||
|
||||
//不显示console.log
|
||||
// if (uni.getSystemInfoSync().platform !== "devtools") {
|
||||
// console.log = () => {}
|
||||
|
@ -142,6 +139,10 @@ var _default = {
|
|||
lng: '',
|
||||
// 公司地址经度
|
||||
hostapi: 'https://building.scdxtc.cn' // 域名配置
|
||||
},
|
||||
onLaunch: function onLaunch() {
|
||||
// uni.removeStorageSync('isRead');
|
||||
// uni.removeStorageSync('ifNotice');
|
||||
}
|
||||
};
|
||||
exports.default = _default;
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* 阿里巴巴矢量图标库 start */
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 3180711 */
|
||||
|
@ -172,7 +176,8 @@
|
|||
.bg-white{ background-color: #ffffff;}
|
||||
.bg-red{ background-color: #ec0707;}
|
||||
.bg-orange{ background-color: #ec7807;}
|
||||
.bg-green{ background-color: #25a63b;}
|
||||
.bg-green{ background-color: #25a63b;}
|
||||
.bg-99{ background-color: #999999;}
|
||||
/* 内边距 */
|
||||
.pad-x100{ padding-bottom: 100rpx;}
|
||||
.pad-x120{ padding-bottom: 120rpx;}
|
||||
|
@ -248,9 +253,12 @@ page{
|
|||
box-shadow: 0 0 22rpx 8rpx rgba(11,66,101,.25);
|
||||
overflow: hidden;
|
||||
}
|
||||
.sign-top .sign-btn.finish{
|
||||
.sign-top .sign-btn.orange{
|
||||
background-image: linear-gradient(to top,#eb7607,#ffc600);
|
||||
}
|
||||
.sign-top .sign-btn.green{
|
||||
background-image: linear-gradient(to top,#21a53c,#7bbc2b);
|
||||
}
|
||||
.sign-top .sign-btn>text{
|
||||
line-height: 30rpx;
|
||||
}
|
||||
|
@ -395,7 +403,7 @@ page{
|
|||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
justify-content: center;
|
||||
padding: 20rpx 30rpx 30rpx;
|
||||
}
|
||||
.notick-status{
|
||||
|
@ -415,7 +423,13 @@ page{
|
|||
.sign-cate .radio-item{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 70rpx;
|
||||
width: 205rpx;
|
||||
height: 70rpx;
|
||||
margin: 0 10rpx;
|
||||
}
|
||||
.notick-status .radio-item:nth-of-type(2n),
|
||||
.sign-cate .radio-item:nth-of-type(2n){
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.notick-status .radio-item>view:first-child,
|
||||
.sign-cate .radio-item>view:first-child{
|
||||
|
@ -561,7 +575,7 @@ page{
|
|||
border-radius: 5rpx;
|
||||
}
|
||||
.register-information .item .textarea{
|
||||
padding: 5rpx 10rpx;
|
||||
padding: 10rpx 10rpx;
|
||||
height: 186rpx;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
@ -595,12 +609,18 @@ page{
|
|||
width: 19rpx;
|
||||
height: 14rpx;
|
||||
}
|
||||
.register-information .submit-btn{
|
||||
.register-information .register-btns{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: calc(100% - 170rpx);
|
||||
margin: 40rpx 0 2rpx 170rpx;
|
||||
}
|
||||
.register-information .register-btns .btn{
|
||||
width: calc(50% - 15rpx);
|
||||
line-height: 80rpx;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
margin: 26rpx 0 2rpx 170rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.register-information .item .name{
|
||||
display: flex;
|
||||
|
@ -859,6 +879,25 @@ page{
|
|||
width: calc(100% - 176rpx);
|
||||
text-align: right;
|
||||
}
|
||||
.information-from .item .picker-msg{
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.information-from .item .picker-msg>picker{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-height: 40px;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
.information-from .item .msg image{
|
||||
width: 88rpx;
|
||||
height: 66rpx !important;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
.information-from .item .msg>text{
|
||||
color: #028bfd;
|
||||
}
|
||||
|
@ -1089,6 +1128,11 @@ page{
|
|||
width: calc(100% - 150rpx);
|
||||
text-align: right;
|
||||
}
|
||||
.enter-detail .item .msg image{
|
||||
width: 88rpx;
|
||||
height: 66rpx !important;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
.director-arrow{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
|
@ -732,8 +732,8 @@ function populateParameters(result) {
|
|||
appVersion: "1.0.0",
|
||||
appVersionCode: "100",
|
||||
appLanguage: getAppLanguage(hostLanguage),
|
||||
uniCompileVersion: "3.6.14",
|
||||
uniRuntimeVersion: "3.6.14",
|
||||
uniCompileVersion: "3.6.15",
|
||||
uniRuntimeVersion: "3.6.15",
|
||||
uniPlatform: undefined || "mp-weixin",
|
||||
deviceBrand: deviceBrand,
|
||||
deviceModel: model,
|
||||
|
@ -11157,6 +11157,19 @@ var tools = {
|
|||
var reg_identity = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
|
||||
return !reg_identity.test(identity);
|
||||
},
|
||||
/**
|
||||
* @description 图片处理
|
||||
*/
|
||||
handleImg: function handleImg(url) {
|
||||
var imgUrl = '';
|
||||
if (url.indexOf('https://') !== -1 || url.indexOf('http://') !== -1) {
|
||||
var baseUrl = url.substring(url.indexOf('//') + 2, url.length);
|
||||
imgUrl = "".concat(getApp().globalData.hostapi) + baseUrl.substring(baseUrl.indexOf('/'), baseUrl.length);
|
||||
} else {
|
||||
imgUrl = "".concat(getApp().globalData.hostapi) + url;
|
||||
}
|
||||
return imgUrl;
|
||||
},
|
||||
/**
|
||||
* @description 手机号中间四位用"****"带替
|
||||
*/
|
||||
|
|
|
@ -81,24 +81,28 @@ var render = function () {
|
|||
var _vm = this
|
||||
var _h = _vm.$createElement
|
||||
var _c = _vm._self._c || _h
|
||||
var l0 = _vm.__map(_vm.days, function (item, index) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g0 = _vm.statusObj.ok.indexOf(item.status)
|
||||
var g1 = _vm.statusObj.add.indexOf(item.status)
|
||||
var g2 = _vm.statusObj.no.indexOf(item.status)
|
||||
var g3 =
|
||||
_vm.statusObj.ok.indexOf(item.status) == -1 &&
|
||||
_vm.statusObj.add.indexOf(item.status) == -1 &&
|
||||
_vm.statusObj.no.indexOf(item.status) == -1 &&
|
||||
item.status !== -2
|
||||
return {
|
||||
$orig: $orig,
|
||||
g0: g0,
|
||||
g1: g1,
|
||||
g2: g2,
|
||||
g3: g3,
|
||||
}
|
||||
})
|
||||
var l0 = _vm.ifLoading
|
||||
? _vm.__map(_vm.days, function (item, index) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g0 =
|
||||
_vm.statusObj.ok.indexOf(item.status) !== -1 &&
|
||||
_vm.statusObj.add.indexOf(item.status) == -1
|
||||
var g1 = _vm.statusObj.add.indexOf(item.status)
|
||||
var g2 = _vm.statusObj.no.indexOf(item.status)
|
||||
var g3 =
|
||||
_vm.statusObj.ok.indexOf(item.status) == -1 &&
|
||||
_vm.statusObj.add.indexOf(item.status) == -1 &&
|
||||
_vm.statusObj.no.indexOf(item.status) == -1 &&
|
||||
item.status !== -2
|
||||
return {
|
||||
$orig: $orig,
|
||||
g0: g0,
|
||||
g1: g1,
|
||||
g2: g2,
|
||||
g3: g3,
|
||||
}
|
||||
})
|
||||
: null
|
||||
_vm.$mp.data = Object.assign(
|
||||
{},
|
||||
{
|
||||
|
@ -186,7 +190,9 @@ var _default = {
|
|||
//当前年
|
||||
curMonth: new Date().getMonth() + 1,
|
||||
//当前月
|
||||
statusObj: {} //状态列表
|
||||
statusObj: {},
|
||||
//状态列表
|
||||
ifLoading: false //是否加载完成
|
||||
};
|
||||
},
|
||||
mounted: function mounted() {
|
||||
|
@ -271,11 +277,21 @@ var _default = {
|
|||
},
|
||||
// 获取状态列表
|
||||
getStatusObj: function getStatusObj() {
|
||||
this.statusObj = {
|
||||
'ok': [2, 5, 6, 8, 12],
|
||||
'add': [4, 7, 11, 22],
|
||||
'no': [19, 28]
|
||||
};
|
||||
var _this = this;
|
||||
this.$requst.get('/api/v1/user/month-sign-log', {
|
||||
date: "".concat(this.curYear, "-").concat(this.curMonth < 10 ? '0' + this.curMonth : this.curMonth)
|
||||
}).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
console.log(res, '月度打卡信息');
|
||||
_this.statusObj = res.data;
|
||||
_this.ifLoading = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 去查看打卡记录
|
||||
toDetail: function toDetail(status) {
|
||||
var date = "".concat(this.curYear, "-").concat(this.curMonth < 10 ? '0' + this.curMonth : this.curMonth, "-").concat(status < 10 ? '0' + status : status);
|
||||
this.$emit('getDate', date);
|
||||
},
|
||||
// 上一月
|
||||
proEv: function proEv() {
|
||||
|
|
|
@ -1 +1 @@
|
|||
<view class="calendar data-v-c1c4e03c"><view class="data font28 color-white data-v-c1c4e03c"><view data-event-opts="{{[['tap',[['proEv',['$event']]]]]}}" class="btn btn-pro data-v-c1c4e03c" bindtap="__e"></view><view class="txt data-v-c1c4e03c">{{curYear+"年"+(curMonth<10?'0'+curMonth:curMonth)+"月"}}</view><view data-event-opts="{{[['tap',[['nextEv',['$event']]]]]}}" class="btn btn-next data-v-c1c4e03c" bindtap="__e"></view></view><view class="week font24 data-v-c1c4e03c"><block wx:for="{{weeks}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="item data-v-c1c4e03c">{{item}}</view></block></view><view class="days bg-white font26 data-v-c1c4e03c"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="item data-v-c1c4e03c"><block wx:if="{{item.$orig.status==-2}}"><view class="txt color-99 data-v-c1c4e03c">{{item.$orig.date}}</view></block><block wx:if="{{item.g0!==-1}}"><view class="txt color-white bg-green data-v-c1c4e03c">{{item.$orig.date}}</view></block><block wx:if="{{item.g1!==-1}}"><view class="txt color-white bg-orange data-v-c1c4e03c">{{item.$orig.date}}</view></block><block wx:if="{{item.g2!==-1}}"><view class="txt color-white bg-red data-v-c1c4e03c">{{item.$orig.date}}</view></block><block wx:if="{{item.g3}}"><view class="txt data-v-c1c4e03c">{{item.$orig.date}}</view></block></view></block></view><view class="tips font22 data-v-c1c4e03c"><view class="item data-v-c1c4e03c">正常打卡</view><view class="item data-v-c1c4e03c">补打卡</view><view class="item data-v-c1c4e03c">非正常打卡</view></view></view>
|
||||
<block wx:if="{{ifLoading}}"><view class="calendar data-v-c1c4e03c"><view class="data font28 color-white data-v-c1c4e03c"><view data-event-opts="{{[['tap',[['proEv',['$event']]]]]}}" class="btn btn-pro data-v-c1c4e03c" bindtap="__e"></view><view class="txt data-v-c1c4e03c">{{curYear+"年"+(curMonth<10?'0'+curMonth:curMonth)+"月"}}</view><view data-event-opts="{{[['tap',[['nextEv',['$event']]]]]}}" class="btn btn-next data-v-c1c4e03c" bindtap="__e"></view></view><view class="week font24 data-v-c1c4e03c"><block wx:for="{{weeks}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="item data-v-c1c4e03c">{{item}}</view></block></view><view class="days bg-white font26 data-v-c1c4e03c"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="item data-v-c1c4e03c"><block wx:if="{{item.$orig.status==-2}}"><view class="txt color-99 data-v-c1c4e03c">{{item.$orig.date}}</view></block><block wx:if="{{item.g0}}"><view data-event-opts="{{[['tap',[['toDetail',['$0'],[[['days','',index,'status']]]]]]]}}" class="txt color-white bg-green data-v-c1c4e03c" bindtap="__e">{{item.$orig.date}}</view></block><block wx:if="{{item.g1!==-1}}"><view data-event-opts="{{[['tap',[['toDetail',['$0'],[[['days','',index,'status']]]]]]]}}" class="txt color-white bg-orange data-v-c1c4e03c" bindtap="__e">{{item.$orig.date}}</view></block><block wx:if="{{item.g2!==-1}}"><view data-event-opts="{{[['tap',[['toDetail',['$0'],[[['days','',index,'status']]]]]]]}}" class="txt color-white bg-red data-v-c1c4e03c" bindtap="__e">{{item.$orig.date}}</view></block><block wx:if="{{item.g3}}"><view class="txt data-v-c1c4e03c">{{item.$orig.date}}</view></block></view></block></view><view class="tips font22 data-v-c1c4e03c"><view class="item data-v-c1c4e03c">正常打卡</view><view class="item data-v-c1c4e03c">补打卡</view><view class="item data-v-c1c4e03c">非正常打卡</view></view></view></block>
|
|
@ -205,9 +205,20 @@ var _default = {
|
|||
break;
|
||||
case 1:
|
||||
if (this.$toolAll.tools.judgeAuth()) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/worker/overtime/overtime'
|
||||
});
|
||||
if (uni.getStorageSync('worker_role') == 0) {
|
||||
this.$toolAll.tools.showToast('您好,请申请入职!');
|
||||
if (uni.getStorageSync('page-path-options').indexOf('/pages/worker/my/my') == -1) {
|
||||
setTimeout(function () {
|
||||
uni.reLaunch({
|
||||
url: '/pages/worker/my/my?userType=worker'
|
||||
});
|
||||
}, 800);
|
||||
}
|
||||
} else {
|
||||
uni.reLaunch({
|
||||
url: '/pages/worker/overtime/overtime'
|
||||
});
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
|
|
|
@ -243,7 +243,7 @@ var _default = {
|
|||
// 去确认&查看详情
|
||||
toDetail: function toDetail(id) {
|
||||
uni.navigateTo({
|
||||
url: "/pagesB/enterDetail/enterDetail?id=".concat(id)
|
||||
url: "/pagesB/enterDetail/enterDetail?id=".concat(id, "&userType=workbench")
|
||||
});
|
||||
},
|
||||
// 获取录入列表
|
||||
|
|
|
@ -188,6 +188,8 @@ exports.default = void 0;
|
|||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
var _default = {
|
||||
data: function data() {
|
||||
return {
|
||||
|
@ -279,7 +281,7 @@ var _default = {
|
|||
path: url
|
||||
}).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this3.userInfo.avatarUrl = _this3.$hostHttp + res.data.src;
|
||||
_this3.userInfo.avatarUrl = "".concat(getApp().globalData.hostapi) + res.data.src;
|
||||
}
|
||||
uni.hideLoading();
|
||||
});
|
||||
|
|
|
@ -160,7 +160,7 @@ var _default = {
|
|||
console.log(res, '用户信息');
|
||||
// 缓存工人状态
|
||||
uni.setStorageSync('worker_role', res.data.role);
|
||||
// 判断进入路面
|
||||
// 判断进入路径
|
||||
if (res.data.role == 0 || res.data.role == 1) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/worker/sign/sign?userType=worker'
|
||||
|
|
|
@ -364,8 +364,9 @@ var _default = {
|
|||
this.$requst.post('/api/v1/user/info').then(function (res) {
|
||||
if (res.code == 0) {
|
||||
console.log(res, '用户信息');
|
||||
uni.setStorageSync('baseWorksiteId', res.data.worksite_id);
|
||||
if (res.data.role == 0) {
|
||||
_this.showList = [0, 1, 2, 3, 4, 5, 6, 8];
|
||||
_this.showList = [0, 1, 5, 6, 8];
|
||||
}
|
||||
if (res.data.role == 1) {
|
||||
_this.showList = [0, 1, 2, 3, 4, 5, 7, 8];
|
||||
|
@ -374,6 +375,7 @@ var _default = {
|
|||
_this.showList = [0, 1, 2, 3, 4, 5];
|
||||
}
|
||||
_this.userInfo = res.data;
|
||||
_this.userInfo.headimgurl = _this.$toolAll.tools.handleImg(res.data.headimgurl);
|
||||
_this.isLoding = true;
|
||||
}
|
||||
});
|
||||
|
@ -383,9 +385,13 @@ var _default = {
|
|||
if (url == 'auitApply') {
|
||||
this.showApply = true;
|
||||
} else if (url == 'workerApply') {
|
||||
uni.reLaunch({
|
||||
url: '/pages/worker/sign/sign?userType=worker&apply=join'
|
||||
});
|
||||
if (uni.getStorageSync('worksite_id')) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/worker/sign/sign?userType=worker&apply=join'
|
||||
});
|
||||
} else {
|
||||
this.$toolAll.tools.showToast('不在可申请范围内');
|
||||
}
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
|
@ -394,7 +400,16 @@ var _default = {
|
|||
},
|
||||
// 确认离职
|
||||
submitEv: function submitEv() {
|
||||
this.showApply = false;
|
||||
var _this2 = this;
|
||||
this.$requst.post('/api/v1/worker/dimission').then(function (res) {
|
||||
if (res.code == 0) {
|
||||
console.log(res, '用户信息');
|
||||
_this2.$toolAll.tools.showToast('离职申请提交成功');
|
||||
_this2.showApply = false;
|
||||
} else {
|
||||
_this2.$toolAll.tools.showToast(res.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<view class="pad-x120 data-v-21031917"><status-nav vue-id="013eea62-1" ifReturn="{{false}}" navBarTitle="个人中心" titleColor="{{titleColor}}" backgroudColor="{{backgroudColor}}" class="data-v-21031917" bind:__l="__l"></status-nav><block wx:if="{{isLoding}}"><view class="content data-v-21031917"><view class="sign-top my-top font24 color-white data-v-21031917" style="{{'padding-top:'+(statusHeight+50+'px')+';'}}"><image src="/static/my-bg.jpg" mode="aspectFill" class="data-v-21031917"></image><view class="my-info data-v-21031917"><view class="my-cover data-v-21031917"><image src="{{userInfo.headimgurl}}" mode="aspectFill" class="data-v-21031917"></image></view><view class="my-txt data-v-21031917"><view class="font28 data-v-21031917">{{userInfo.nickname}}</view><view class="font24 data-v-21031917">{{userInfo.real_name!==''?userInfo.real_name:'审核中'}}</view></view></view></view><view class="sign-record my-more data-v-21031917"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><block wx:if="{{item.g0!==-1}}"><view data-event-opts="{{[['tap',[['toMore',['$0'],[[['myMoreList','',index,'url']]]]]]]}}" class="item bg-white data-v-21031917" bindtap="__e"><view class="img data-v-21031917"><image style="{{'width:'+(item.$orig.iconWidth+'rpx')+';'+('height:'+(item.$orig.iconHeight+'rpx')+';')}}" src="{{item.$orig.icon}}" mode="aspectFit" class="data-v-21031917"></image></view><view class="txt font28 data-v-21031917">{{item.$orig.title}}</view><image src="/static/icon/icon-arrow-03.png" mode="aspectFit" class="data-v-21031917"></image></view></block></block></view><block wx:if="{{showApply}}"><view class="pop-up-bg data-v-21031917"><view class="sign-cate apply-pop bg-white data-v-21031917"><view class="title apply-title font34 data-v-21031917" style="border-bottom:0;padding-bottom:0;"><image style="width:94rpx;height:90rpx;" src="/static/icon/icon-apply.png" mode="aspectFill" class="data-v-21031917"></image></view><view class="txt apply-txt font30 data-v-21031917" style="justify-content:center;text-align:center;"><text class="data-v-21031917">请确认
|
||||
<view class="pad-x120 data-v-21031917"><status-nav vue-id="013eea62-1" ifReturn="{{false}}" navBarTitle="个人中心" titleColor="{{titleColor}}" backgroudColor="{{backgroudColor}}" class="data-v-21031917" bind:__l="__l"></status-nav><block wx:if="{{isLoding}}"><view class="content data-v-21031917"><view class="sign-top my-top font24 color-white data-v-21031917" style="{{'padding-top:'+(statusHeight+50+'px')+';'}}"><image src="/static/my-bg.jpg" mode="aspectFill" class="data-v-21031917"></image><view class="my-info data-v-21031917"><view class="my-cover data-v-21031917"><image src="{{userInfo.headimgurl}}" mode="aspectFill" class="data-v-21031917"></image></view><block wx:if="{{userInfo.role!==2}}"><view class="my-txt data-v-21031917"><view class="font28 data-v-21031917">{{userInfo.nickname}}</view><block wx:if="{{userInfo.real_name==''}}"><view class="font24 data-v-21031917">{{userInfo.checking==1?'入职审核中':'普通用户'}}</view></block><block wx:else><view class="font24 data-v-21031917">{{userInfo.real_name}}</view></block></view></block><block wx:else><view class="my-txt data-v-21031917"><view class="font28 data-v-21031917">{{userInfo.nickname}}</view><view class="font24 data-v-21031917">负责人</view></view></block></view></view><view class="sign-record my-more data-v-21031917"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><block wx:if="{{item.g0!==-1}}"><view data-event-opts="{{[['tap',[['toMore',['$0'],[[['myMoreList','',index,'url']]]]]]]}}" class="item bg-white data-v-21031917" bindtap="__e"><view class="img data-v-21031917"><image style="{{'width:'+(item.$orig.iconWidth+'rpx')+';'+('height:'+(item.$orig.iconHeight+'rpx')+';')}}" src="{{item.$orig.icon}}" mode="aspectFit" class="data-v-21031917"></image></view><view class="txt font28 data-v-21031917">{{item.$orig.title}}</view><image src="/static/icon/icon-arrow-03.png" mode="aspectFit" class="data-v-21031917"></image></view></block></block></view><block wx:if="{{showApply}}"><view class="pop-up-bg data-v-21031917"><view class="sign-cate apply-pop bg-white data-v-21031917"><view class="title apply-title font34 data-v-21031917" style="border-bottom:0;padding-bottom:0;"><image style="width:94rpx;height:90rpx;" src="/static/icon/icon-apply.png" mode="aspectFill" class="data-v-21031917"></image></view><view class="txt apply-txt font30 data-v-21031917" style="justify-content:center;text-align:center;"><text class="data-v-21031917">请确认
|
||||
您是否真的要申请离职?</text></view><view class="sign-cate-btns color-white font30 data-v-21031917"><view data-event-opts="{{[['tap',[['e0',['$event']]]]]}}" class="btn data-v-21031917" bindtap="__e">取消</view><view data-event-opts="{{[['tap',[['submitEv',['$event']]]]]}}" class="btn data-v-21031917" bindtap="__e">确认</view></view></view></view></block></view></block><tabbar vue-id="013eea62-2" userType="{{userType}}" current="2" class="data-v-21031917" bind:__l="__l"></tabbar></view>
|
|
@ -217,17 +217,17 @@ var _default = {
|
|||
titleColor: '#ffffff',
|
||||
//导航栏颜色
|
||||
radioList: [{
|
||||
title: '上午上班打卡',
|
||||
type: 'in'
|
||||
title: '上午上班',
|
||||
type: 'morning_on'
|
||||
}, {
|
||||
title: '上午下班打卡',
|
||||
type: 'out'
|
||||
title: '上午下班',
|
||||
type: 'morning_off'
|
||||
}, {
|
||||
title: '下午上班打卡',
|
||||
type: 'in'
|
||||
title: '下午上班',
|
||||
type: 'afternoon_on'
|
||||
}, {
|
||||
title: '下午下班打卡',
|
||||
type: 'out'
|
||||
title: '下午下班',
|
||||
type: 'afternoon_off'
|
||||
}],
|
||||
//打卡类型
|
||||
radioIndex: 0,
|
||||
|
@ -265,19 +265,24 @@ var _default = {
|
|||
bank_card_number: '',
|
||||
bank_name: '',
|
||||
worksite_id: -1,
|
||||
experience: '',
|
||||
address: '',
|
||||
bank_img: ''
|
||||
work_experience: '',
|
||||
address_now: '',
|
||||
bank_card_img: '',
|
||||
id_front: '',
|
||||
id_back: '',
|
||||
certificate: '',
|
||||
province: '北京市',
|
||||
//省
|
||||
city: '北京市',
|
||||
//市
|
||||
area: '东城区' //区
|
||||
},
|
||||
|
||||
//工人注册信息
|
||||
idImgList: ['', ''],
|
||||
//身份证照片
|
||||
positionList: [],
|
||||
//技术岗位
|
||||
positionIndex: 0,
|
||||
//当前技术岗位
|
||||
finish: false,
|
||||
//是否完成打卡
|
||||
flag: true,
|
||||
//是否能提交
|
||||
isLoding: false,
|
||||
|
@ -292,14 +297,15 @@ var _default = {
|
|||
//公告
|
||||
ifNotice: false,
|
||||
//是否显示公告
|
||||
wsNotice: '',
|
||||
//工地公告
|
||||
ifWsNotice: false,
|
||||
// 是否显示工地公告
|
||||
stagingImg: '',
|
||||
//暂存img
|
||||
|
||||
province: '北京市',
|
||||
//省
|
||||
city: '北京市',
|
||||
//市
|
||||
county: '东城区' //区
|
||||
ifRegister: false,
|
||||
//是否显示注册表
|
||||
buttonColor: '' //打卡按钮颜色
|
||||
};
|
||||
},
|
||||
onPageScroll: function onPageScroll(object) {
|
||||
|
@ -323,22 +329,17 @@ var _default = {
|
|||
this.userType = op.userType;
|
||||
}
|
||||
if (op.apply == 'join') {
|
||||
// 获取用户信息
|
||||
this.getUserInfo();
|
||||
// 显示注册表
|
||||
this.ifRegister = true;
|
||||
}
|
||||
// 获取用户信息
|
||||
this.getUserInfo();
|
||||
// 改变状态栏
|
||||
this.changeStatusNav();
|
||||
// 获取位置信息
|
||||
this.getLocationEv(0);
|
||||
// 判断是否查看安全公告
|
||||
if (uni.getStorageSync('isRead')) {
|
||||
// 查询是否有通知
|
||||
this.getNoticeInfo();
|
||||
} else {
|
||||
this.isRead = false;
|
||||
// 获取安全告知
|
||||
this.getSafetyBulletin();
|
||||
}
|
||||
// 获取工作岗位
|
||||
this.getPositionList();
|
||||
},
|
||||
onShow: function onShow() {
|
||||
// 获取打卡信息
|
||||
|
@ -346,10 +347,6 @@ var _default = {
|
|||
// 获取打卡记录
|
||||
this.getSignList();
|
||||
},
|
||||
onHide: function onHide() {
|
||||
// 缓存公告为未读
|
||||
uni.setStorageSync('ifNotice', 'notNotice');
|
||||
},
|
||||
onShareAppMessage: function onShareAppMessage(res) {
|
||||
var shareObj = {
|
||||
title: '工地打卡',
|
||||
|
@ -380,119 +377,45 @@ var _default = {
|
|||
if (res.code == 0) {
|
||||
console.log(res, '用户信息');
|
||||
_this.userInfo = res.data;
|
||||
// 获取技术岗位
|
||||
if (_this.userInfo.checking == 0 && _this.userInfo.role == 0) {
|
||||
_this.getPositionList();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 选择省市区
|
||||
changeAddress: function changeAddress(e) {
|
||||
this.province = e.detail.value[0];
|
||||
this.city = e.detail.value[1];
|
||||
this.county = e.detail.value[2];
|
||||
},
|
||||
// 获取公告
|
||||
getNotice: function getNotice() {
|
||||
var _this2 = this;
|
||||
this.$requst.get('/api/v1/index/notice').then(function (res) {
|
||||
if (res.code == 0) {
|
||||
console.log(res, '公告');
|
||||
if (res.data.status == 1) {
|
||||
_this2.ifNotice = true;
|
||||
uni.setStorageSync('ifNotice', 'hasNotice');
|
||||
_this2.notice = res.data.content;
|
||||
} else {
|
||||
_this2.ifNotice = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 关闭公告
|
||||
closeNotice: function closeNotice() {
|
||||
this.ifNotice = false;
|
||||
},
|
||||
// 查询是否有通知
|
||||
getNoticeInfo: function getNoticeInfo() {
|
||||
var _this3 = this;
|
||||
this.$requst.get('/api/v1/common/notice').then(function (res) {
|
||||
if (res.code == 0) {
|
||||
console.log(res, '通知消息');
|
||||
if (res.data.notice == 1) {
|
||||
_this3.isNotice = true;
|
||||
_this3.noticeInfo = res.data;
|
||||
} else {
|
||||
_this3.isNotice = false;
|
||||
// 判断是否已经查看公告
|
||||
if (uni.getStorageSync('ifNotice') !== 'hasNotice') {
|
||||
// 获取公告
|
||||
_this3.getNotice();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 关闭通知
|
||||
closeEdit: function closeEdit() {
|
||||
this.isNotice = false;
|
||||
// 判断是否已经查看公告
|
||||
if (uni.getStorageSync('ifNotice') !== 'hasNotice') {
|
||||
// 获取公告
|
||||
this.getNotice();
|
||||
}
|
||||
},
|
||||
// 修改审核资料
|
||||
editEv: function editEv() {
|
||||
// 获取用户信息
|
||||
this.getUserInfo();
|
||||
},
|
||||
// 查询审核资料
|
||||
getCheckDetail: function getCheckDetail() {
|
||||
var _this4 = this;
|
||||
this.$requst.get('/api/v1/worker/check-detail', {
|
||||
id: this.noticeInfo.id
|
||||
}).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
console.log(res, '审核资料');
|
||||
_this4.positionIndex = _this4.positionList.findIndex(function (item) {
|
||||
return item.id === res.data.position;
|
||||
});
|
||||
_this4.registerObj = {
|
||||
real_name: res.data.real_name,
|
||||
mobile: res.data.mobile,
|
||||
card_number: res.data.card_number,
|
||||
pay: parseFloat(res.data.pay),
|
||||
position: res.data.position,
|
||||
emergency_contact: res.data.emergency_contact,
|
||||
emergency_phone: res.data.emergency_phone,
|
||||
bank_card_name: res.data.bank_card_name,
|
||||
bank_card_number: res.data.bank_card_number,
|
||||
bank_name: res.data.bank_name,
|
||||
worksite_id: res.data.worksite_id
|
||||
};
|
||||
}
|
||||
});
|
||||
this.registerObj.province = e.detail.value[0];
|
||||
this.registerObj.city = e.detail.value[1];
|
||||
this.registerObj.area = e.detail.value[2];
|
||||
},
|
||||
// 授权位置信息
|
||||
getLocationEv: function getLocationEv(type) {
|
||||
var _this5 = this;
|
||||
var _this2 = this;
|
||||
uni.getLocation({
|
||||
type: 'gcj02',
|
||||
isHighAccuracy: 'true',
|
||||
success: function success(res) {
|
||||
console.log(res, '位置信息');
|
||||
if (type == '1') {
|
||||
_this5.$toolAll.tools.showToast('重新定位成功');
|
||||
_this2.$toolAll.tools.showToast('重新定位成功');
|
||||
}
|
||||
//获取工地列表
|
||||
_this5.getSiteEv(res.longitude, res.latitude);
|
||||
_this2.getSiteEv(res.longitude, res.latitude);
|
||||
},
|
||||
complete: function complete() {
|
||||
// 判断是否查看安全公告
|
||||
if (uni.getStorageSync('readSafeNotice')) {
|
||||
// 查询是否有通知
|
||||
_this2.getNoticeInfo();
|
||||
} else {
|
||||
_this2.isRead = false;
|
||||
// 获取安全告知
|
||||
_this2.getSafetyBulletin();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取工地列表
|
||||
getSiteEv: function getSiteEv(lng, lat) {
|
||||
var _this6 = this;
|
||||
var _this3 = this;
|
||||
this.$requst.get('/api/v1/common/get-current-worksite', {
|
||||
lng: lng,
|
||||
lat: lat
|
||||
|
@ -501,58 +424,144 @@ var _default = {
|
|||
console.log(res, '定位工地信息');
|
||||
// 缓存工地id
|
||||
uni.setStorageSync('worksite_id', res.data.id);
|
||||
_this6.siteInfo = res.data;
|
||||
_this6.registerObj.worksite_id = res.data.id;
|
||||
_this6.isLoding = true;
|
||||
_this3.siteInfo = res.data;
|
||||
_this3.registerObj.worksite_id = res.data.id;
|
||||
_this3.isLoding = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取安全告知
|
||||
getSafetyBulletin: function getSafetyBulletin() {
|
||||
var _this7 = this;
|
||||
if (!this.isRead) {
|
||||
var _this4 = this;
|
||||
if (!this.readSafeNotice) {
|
||||
this.$requst.get('/api/v1/index/safe-notice').then(function (res) {
|
||||
if (res.code == 0) {
|
||||
console.log(res, '安全公告');
|
||||
_this7.safetyBulletin = res.data.content;
|
||||
console.log(res, '安全告知');
|
||||
_this4.safetyBulletin = res.data.content;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 判断是否已经查看公告
|
||||
if (uni.getStorageSync('ifNotice') !== 'hasNotice') {
|
||||
// 获取公告
|
||||
this.getNotice();
|
||||
}
|
||||
}
|
||||
},
|
||||
// 关闭安全公告
|
||||
closeSafetyBulletin: function closeSafetyBulletin() {
|
||||
this.isRead = true;
|
||||
// 缓存是否已读
|
||||
uni.setStorageSync('isRead', this.isRead);
|
||||
if (uni.getStorageSync('worker_role') == 0) {
|
||||
this.$toolAll.tools.showToast('请先登录授权');
|
||||
setTimeout(function () {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
});
|
||||
}, 2000);
|
||||
} else {
|
||||
// 查询是否有通知
|
||||
this.getNoticeInfo();
|
||||
}
|
||||
},
|
||||
// 关闭安全告知
|
||||
closeSafetyBulletin: function closeSafetyBulletin() {
|
||||
this.isRead = true;
|
||||
// 缓存是否已读
|
||||
uni.setStorageSync('readSafeNotice', true);
|
||||
// 查询是否有通知
|
||||
this.getNoticeInfo();
|
||||
},
|
||||
// 查询是否有通知
|
||||
getNoticeInfo: function getNoticeInfo() {
|
||||
var _this5 = this;
|
||||
this.$requst.get('/api/v1/common/notice').then(function (res) {
|
||||
if (res.code == 0) {
|
||||
console.log(res, '通知消息');
|
||||
if (res.data.notice == 1) {
|
||||
_this5.isNotice = true;
|
||||
_this5.noticeInfo = res.data;
|
||||
} else {
|
||||
// 获取公告
|
||||
_this5.getNotice();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 关闭通知
|
||||
closeEdit: function closeEdit() {
|
||||
this.isNotice = false;
|
||||
// 获取公告
|
||||
this.getNotice();
|
||||
},
|
||||
// 修改审核资料
|
||||
editEv: function editEv() {
|
||||
this.isNotice = false;
|
||||
// 显示注册表
|
||||
this.ifRegister = true;
|
||||
// 查询审核资料
|
||||
this.getCheckDetail();
|
||||
},
|
||||
// 获取公告
|
||||
getNotice: function getNotice() {
|
||||
var _this6 = this;
|
||||
this.$requst.get('/api/v1/index/notice').then(function (res) {
|
||||
if (res.code == 0) {
|
||||
console.log(res, '公告');
|
||||
if (res.data.status == 1) {
|
||||
if (uni.getStorageSync('noticeVersion') !== res.data.version) {
|
||||
_this6.ifNotice = true;
|
||||
uni.setStorageSync('noticeVersion', res.data.version);
|
||||
_this6.notice = res.data.content;
|
||||
} else {
|
||||
// 获取工地公告
|
||||
_this6.getWorksiteNotice();
|
||||
}
|
||||
} else {
|
||||
// 获取工地公告
|
||||
_this6.getWorksiteNotice();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 关闭公告||安全公告
|
||||
closeNotice: function closeNotice() {
|
||||
if (!this.ifWsNotice) {
|
||||
this.ifNotice = false;
|
||||
// 获取工地公告
|
||||
this.getWorksiteNotice();
|
||||
} else {
|
||||
this.ifWsNotice = false;
|
||||
}
|
||||
},
|
||||
// 获取工地公告
|
||||
getWorksiteNotice: function getWorksiteNotice() {
|
||||
var _this7 = this;
|
||||
this.$requst.get('/api/v1/index/worksite-notice', {
|
||||
worksite_id: this.registerObj.worksite_id
|
||||
}).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
console.log(res, '工地公告');
|
||||
if (res.data.status == 1) {
|
||||
if (uni.getStorageSync('wsNoticeVersion') !== res.data.version) {
|
||||
_this7.ifWsNotice = true;
|
||||
uni.setStorageSync('wsNoticeVersion', res.data.version);
|
||||
_this7.wsNotice = res.data.content;
|
||||
}
|
||||
// 查询审核资料
|
||||
_this7.getCheckDetail();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查询审核资料
|
||||
getCheckDetail: function getCheckDetail() {
|
||||
var _this8 = this;
|
||||
this.$requst.get('/api/v1/worker/check-detail', {
|
||||
id: this.noticeInfo.id
|
||||
}).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
console.log(res, '审核资料');
|
||||
_this8.registerObj = res.data;
|
||||
_this8.positionIndex = _this8.positionList.findIndex(function (item) {
|
||||
return item.id === res.data.position;
|
||||
});
|
||||
_this8.registerObj.pay = parseFloat(res.data.pay);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取技术岗位
|
||||
getPositionList: function getPositionList() {
|
||||
var _this8 = this;
|
||||
var _this9 = this;
|
||||
this.$requst.get('/api/v1/common/position-list').then(function (res) {
|
||||
if (res.code == 0) {
|
||||
console.log(res, '技术岗位');
|
||||
_this8.positionList = res.data.list;
|
||||
_this8.registerObj.position = res.data.list[_this8.positionIndex].id;
|
||||
if (_this8.noticeInfo.notice == 1) {
|
||||
_this9.positionList = res.data.list;
|
||||
_this9.registerObj.position = res.data.list[_this9.positionIndex].id;
|
||||
if (_this9.noticeInfo.notice == 1) {
|
||||
// 查询审核资料
|
||||
_this8.getCheckDetail();
|
||||
_this9.getCheckDetail();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -564,27 +573,40 @@ var _default = {
|
|||
},
|
||||
// 提交注册信息
|
||||
submitRegister: function submitRegister() {
|
||||
var _this9 = this;
|
||||
var _this10 = this;
|
||||
if (this.checkEmpty() && this.flag) {
|
||||
this.flag = false;
|
||||
var params = this.registerObj;
|
||||
this.$requst.post('/api/v1/worker/register', params).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this9.$toolAll.tools.showToast('提交成功');
|
||||
// 查询是否有通知
|
||||
_this9.getNoticeInfo();
|
||||
_this10.$toolAll.tools.showToast('提交成功');
|
||||
// 隐藏注册表
|
||||
_this10.ifRegister = false;
|
||||
setTimeout(function () {
|
||||
_this9.flag = true;
|
||||
_this10.flag = true;
|
||||
}, 2000);
|
||||
} else {
|
||||
_this9.$toolAll.tools.showToast(res.msg);
|
||||
_this10.$toolAll.tools.showToast(res.msg);
|
||||
setTimeout(function () {
|
||||
_this9.flag = true;
|
||||
_this10.flag = true;
|
||||
}, 2000);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 取消注册
|
||||
cancelRegister: function cancelRegister() {
|
||||
// 隐藏注册表
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
// 返回的页面数
|
||||
fail: function fail() {
|
||||
uni.reLaunch({
|
||||
url: '/pages/pagehome/pagehome'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 验证电话号
|
||||
checkEmpty: function checkEmpty() {
|
||||
var result = false;
|
||||
|
@ -597,31 +619,29 @@ var _default = {
|
|||
},
|
||||
// 获取打卡信息
|
||||
getSignInfo: function getSignInfo() {
|
||||
var _this10 = this;
|
||||
var _this11 = this;
|
||||
this.$requst.get('/api/v1/user/sign-info').then(function (res) {
|
||||
if (res.code == 0) {
|
||||
console.log(res, '打卡信息');
|
||||
// 获取日期
|
||||
_this10.currentDate = res.data.info.today;
|
||||
_this11.currentDate = res.data.info.today;
|
||||
// 获取星期几
|
||||
_this10.currentWeek = res.data.info.week;
|
||||
_this11.currentWeek = res.data.info.week;
|
||||
// 获取当前时间
|
||||
_this10.currenTime = res.data.info.now;
|
||||
// 获取打卡记录列表
|
||||
_this10.signList = res.data.list;
|
||||
_this11.currenTime = res.data.info.now;
|
||||
// 服务端时间处理
|
||||
_this10.setIntervalEv();
|
||||
_this11.setIntervalEv();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 服务端时间处理
|
||||
setIntervalEv: function setIntervalEv() {
|
||||
var _this11 = this;
|
||||
var _this12 = this;
|
||||
// 改变计时器状态
|
||||
this.timer = true;
|
||||
if (this.timer) {
|
||||
setInterval(function () {
|
||||
var nowArr = _this11.currenTime.split(':');
|
||||
var nowArr = _this12.currenTime.split(':');
|
||||
var hour = parseInt(nowArr[0]);
|
||||
var minute = parseInt(nowArr[1]);
|
||||
var second = parseInt(nowArr[2]);
|
||||
|
@ -640,32 +660,35 @@ var _default = {
|
|||
}
|
||||
}
|
||||
}
|
||||
_this11.currenTime = "".concat(hour < 10 ? '0' + hour : hour, ":").concat(minute < 10 ? '0' + minute : minute, ":").concat(second < 10 ? '0' + second : second);
|
||||
_this12.currenTime = "".concat(hour < 10 ? '0' + hour : hour, ":").concat(minute < 10 ? '0' + minute : minute, ":").concat(second < 10 ? '0' + second : second);
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
// 获取打卡记录
|
||||
getSignList: function getSignList() {
|
||||
var _this12 = this;
|
||||
var _this13 = this;
|
||||
this.$requst.get('/api/v1/user/sign-today').then(function (res) {
|
||||
if (res.code == 0) {
|
||||
console.log(res, '打卡记录');
|
||||
// 获取打卡状态
|
||||
_this13.buttonColor = res.data.buttonColor;
|
||||
// 获取打卡记录列表
|
||||
_this12.signList = res.data.list;
|
||||
_this13.signList = res.data.list;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 唤起打卡弹窗
|
||||
showRadioEv: function showRadioEv() {
|
||||
if (this.siteInfo.name) {
|
||||
if (!this.finish) {
|
||||
if (this.userInfo.role !== 0) {
|
||||
if (this.siteInfo.name) {
|
||||
this.showRadio = true;
|
||||
this.radioIndex = 0;
|
||||
} else {
|
||||
this.$toolAll.tools.showToast('您已打卡');
|
||||
this.$toolAll.tools.showToast('不在打卡范围内');
|
||||
}
|
||||
} else {
|
||||
this.$toolAll.tools.showToast('不在打卡范围内');
|
||||
this.showRadio = true;
|
||||
this.radioIndex = 0;
|
||||
}
|
||||
},
|
||||
// 改变上下班打卡
|
||||
|
@ -676,46 +699,43 @@ var _default = {
|
|||
},
|
||||
// 打卡
|
||||
signEv: function signEv() {
|
||||
var _this13 = this;
|
||||
var _this14 = this;
|
||||
var params = {
|
||||
type: this.radioList[this.radioIndex].type,
|
||||
lat: this.siteInfo.lat,
|
||||
lng: this.siteInfo.lng,
|
||||
worksite_id: this.siteInfo.id
|
||||
};
|
||||
this.$requst.post('/api/v1/worker/sign', params).then(function (res) {
|
||||
this.$requst.post('/api/v1/user/sign', params).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this13.finish = true;
|
||||
_this13.showRadio = false;
|
||||
_this14.showRadio = false;
|
||||
// 获取打卡记录
|
||||
_this13.getSignList();
|
||||
// 延时改变打卡状态
|
||||
setTimeout(function () {
|
||||
_this13.finish = false;
|
||||
}, 60000);
|
||||
_this14.getSignList();
|
||||
// 获取状态列表
|
||||
_this14.$refs.signCalendar.getStatusObj();
|
||||
} else {
|
||||
_this13.$toolAll.tools.showToast(res.msg);
|
||||
_this14.$toolAll.tools.showToast(res.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 选择图片
|
||||
changeImg: function changeImg(type) {
|
||||
var _this14 = this;
|
||||
var _this15 = this;
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
//默认9
|
||||
sourceType: ['album', 'camera'],
|
||||
//从相册选择
|
||||
success: function success(res) {
|
||||
_this14.stagingImg = res.tempFilePaths[0];
|
||||
_this15.stagingImg = res.tempFilePaths[0];
|
||||
// 上传图片
|
||||
_this14.uploadImg(type);
|
||||
_this15.uploadImg(type);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 上传图片
|
||||
uploadImg: function uploadImg(type) {
|
||||
var _this15 = this;
|
||||
var _this16 = this;
|
||||
uni.showLoading({
|
||||
title: '上传中'
|
||||
});
|
||||
|
@ -724,13 +744,13 @@ var _default = {
|
|||
}).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
if (type == 'positive') {
|
||||
_this15.idImgList[0] = _this15.$hostHttp + res.data.src;
|
||||
_this16.registerObj.id_front = "".concat(getApp().globalData.hostapi) + res.data.src;
|
||||
}
|
||||
if (type == 'back') {
|
||||
_this15.idImgList[1] = _this15.$hostHttp + res.data.src;
|
||||
_this16.registerObj.id_back = "".concat(getApp().globalData.hostapi) + res.data.src;
|
||||
}
|
||||
if (type == 'bank') {
|
||||
_this15.registerObj.bank_img = _this15.$hostHttp + res.data.src;
|
||||
_this16.registerObj.bank_card_img = "".concat(getApp().globalData.hostapi) + res.data.src;
|
||||
}
|
||||
}
|
||||
uni.hideLoading();
|
||||
|
@ -739,13 +759,13 @@ var _default = {
|
|||
// 删除图片
|
||||
delImg: function delImg(index, type) {
|
||||
if (type == 'positive') {
|
||||
this.idImgList[0] = '';
|
||||
this.registerObj.id_front = '';
|
||||
}
|
||||
if (type == 'back') {
|
||||
this.idImgList[1] = '';
|
||||
this.registerObj.id_back = '';
|
||||
}
|
||||
if (type == 'bank') {
|
||||
this.registerObj.bank_img = '';
|
||||
this.registerObj.bank_card_img = '';
|
||||
}
|
||||
},
|
||||
// 预览图片
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -221,6 +221,9 @@ var _default = {
|
|||
console.log(res, '用户信息');
|
||||
_this.userInfo = res.data;
|
||||
_this.isLoding = true;
|
||||
_this.positionIndex = _this.positionList.findIndex(function (item) {
|
||||
return item.id === res.data.position;
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -236,11 +239,17 @@ var _default = {
|
|||
},
|
||||
// 选择技术岗位
|
||||
bindPositionChange: function bindPositionChange(e) {
|
||||
var _this3 = this;
|
||||
this.positionIndex = e.detail.value;
|
||||
this.field = 'position';
|
||||
this.editMsg = this.positionList[this.positionIndex].id;
|
||||
setTimeout(function () {
|
||||
// 提交修改
|
||||
_this3.submitEv();
|
||||
}, 200);
|
||||
},
|
||||
// 打开修改弹窗
|
||||
editEv: function editEv(num, type) {
|
||||
var _this3 = this;
|
||||
this.ifShow = true;
|
||||
this.field = type;
|
||||
switch (num) {
|
||||
|
@ -249,10 +258,8 @@ var _default = {
|
|||
this.editMsg = this.userInfo.nickname;
|
||||
break;
|
||||
case 1:
|
||||
this.editTitle = '技术岗位';
|
||||
this.positionIndex = this.positionList.findIndex(function (item) {
|
||||
return item.id === _this3.userInfo.position;
|
||||
});
|
||||
this.editTitle = '详细地址';
|
||||
this.editMsg = this.userInfo.address_now;
|
||||
break;
|
||||
case 2:
|
||||
this.editTitle = '工资';
|
||||
|
@ -286,6 +293,18 @@ var _default = {
|
|||
this.editTitle = '开户行';
|
||||
this.editMsg = this.userInfo.bank_name;
|
||||
break;
|
||||
case 10:
|
||||
this.editTitle = '身份证号';
|
||||
this.editMsg = this.userInfo.card_number;
|
||||
break;
|
||||
case 11:
|
||||
this.editTitle = '工作经验';
|
||||
this.editMsg = this.userInfo.work_experience;
|
||||
break;
|
||||
case 12:
|
||||
this.editTitle = '证书名称';
|
||||
this.editMsg = this.userInfo.certificate;
|
||||
break;
|
||||
}
|
||||
},
|
||||
// 关闭修改弹窗
|
||||
|
@ -295,25 +314,104 @@ var _default = {
|
|||
this.field = '';
|
||||
this.editMsg = '';
|
||||
},
|
||||
// 选择图片
|
||||
changeImg: function changeImg(type) {
|
||||
var _this4 = this;
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
//默认9
|
||||
sourceType: ['album', 'camera'],
|
||||
//从相册选择
|
||||
success: function success(res) {
|
||||
_this4.stagingImg = res.tempFilePaths[0];
|
||||
// 上传图片
|
||||
_this4.uploadImg(type);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 上传图片
|
||||
uploadImg: function uploadImg(type) {
|
||||
var _this5 = this;
|
||||
uni.showLoading({
|
||||
title: '上传中'
|
||||
});
|
||||
this.$requst.upload('/api/v1/file/upload/image', {
|
||||
path: this.stagingImg
|
||||
}).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
if (type == 'positive') {
|
||||
_this5.userInfo.id_front = "".concat(getApp().globalData.hostapi) + res.data.src;
|
||||
_this5.field = 'id_front';
|
||||
_this5.editMsg = _this5.userInfo.id_front;
|
||||
setTimeout(function () {
|
||||
// 提交修改
|
||||
_this5.submitEv();
|
||||
}, 200);
|
||||
}
|
||||
if (type == 'back') {
|
||||
_this5.userInfo.id_back = "".concat(getApp().globalData.hostapi) + res.data.src;
|
||||
_this5.field = 'id_back';
|
||||
_this5.editMsg = _this5.userInfo.id_back;
|
||||
setTimeout(function () {
|
||||
// 提交修改
|
||||
_this5.submitEv();
|
||||
}, 200);
|
||||
}
|
||||
if (type == 'bank') {
|
||||
_this5.userInfo.bank_card_img = "".concat(getApp().globalData.hostapi) + res.data.src;
|
||||
_this5.field = 'bank_card_img';
|
||||
_this5.editMsg = _this5.userInfo.bank_card_img;
|
||||
setTimeout(function () {
|
||||
// 提交修改
|
||||
_this5.submitEv();
|
||||
}, 200);
|
||||
}
|
||||
}
|
||||
uni.hideLoading();
|
||||
});
|
||||
},
|
||||
// 选择省市区
|
||||
changeAddress: function changeAddress(e) {
|
||||
var _this6 = this;
|
||||
this.userInfo.province = e.detail.value[0];
|
||||
this.userInfo.city = e.detail.value[1];
|
||||
this.userInfo.area = e.detail.value[2];
|
||||
this.field = 'address';
|
||||
this.editMsg = e.detail.value[0] + e.detail.value[1] + e.detail.value[2];
|
||||
setTimeout(function () {
|
||||
// 提交修改
|
||||
_this6.submitEv();
|
||||
}, 200);
|
||||
},
|
||||
// 提交修改
|
||||
submitEv: function submitEv() {
|
||||
var _this4 = this;
|
||||
var _this7 = this;
|
||||
var params = {
|
||||
field: this.field,
|
||||
value: this.editMsg !== "" ? this.editMsg : this.positionList[this.positionIndex].id
|
||||
};
|
||||
console.log(params, 121212);
|
||||
this.$requst.post('/api/v1/worker/update-info', params).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this4.$toolAll.tools.showToast('提交成功');
|
||||
_this7.$toolAll.tools.showToast('提交成功');
|
||||
setTimeout(function () {
|
||||
_this4.ifShow = false;
|
||||
_this7.ifShow = false;
|
||||
// 获取用户信息
|
||||
_this4.getUserInfo();
|
||||
_this7.getUserInfo();
|
||||
}, 200);
|
||||
} else {
|
||||
_this4.$toolAll.tools.showToast(res.msg);
|
||||
_this7.$toolAll.tools.showToast(res.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 图片预览
|
||||
previewImageEv: function previewImageEv(url) {
|
||||
//uniapp预览轮播图
|
||||
uni.previewImage({
|
||||
current: 0,
|
||||
//预览图片的下标
|
||||
urls: [url] //预览图片的地址,必须要数组形式,如果不是数组形式就转换成数组形式就可以
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -69,12 +69,15 @@ var render = function () {
|
|||
var _vm = this
|
||||
var _h = _vm.$createElement
|
||||
var _c = _vm._self._c || _h
|
||||
var g0 = _vm.curDate.substr(0, 4)
|
||||
var g1 = _vm.curDate.substr(5, 2)
|
||||
var g2 = _vm.curDate.substr(8, 2)
|
||||
var l0 = _vm.__map(_vm.signList, function (item, index) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g0 = item.created_at.substr(item.created_at.length - 8)
|
||||
var g3 = item.created_at.substr(item.created_at.length - 8)
|
||||
return {
|
||||
$orig: $orig,
|
||||
g0: g0,
|
||||
g3: g3,
|
||||
}
|
||||
})
|
||||
if (!_vm._isMounted) {
|
||||
|
@ -89,6 +92,9 @@ var render = function () {
|
|||
{},
|
||||
{
|
||||
$root: {
|
||||
g0: g0,
|
||||
g1: g1,
|
||||
g2: g2,
|
||||
l0: l0,
|
||||
},
|
||||
}
|
||||
|
@ -142,18 +148,6 @@ var tabbar = function tabbar() {
|
|||
return resolve(__webpack_require__(/*! @/components/tabbar/tabbar */ 179));
|
||||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||||
};
|
||||
function getDate(type) {
|
||||
var date = new Date();
|
||||
var year = date.getFullYear();
|
||||
var month = date.getMonth() + 1;
|
||||
var day = date.getDate();
|
||||
if (type === 'start') {
|
||||
year = year - 10;
|
||||
}
|
||||
month = month > 9 ? month : '0' + month;
|
||||
day = day > 9 ? day : '0' + day;
|
||||
return "".concat(year, "-").concat(month, "-").concat(day);
|
||||
}
|
||||
var _default = {
|
||||
components: {
|
||||
signCalendar: signCalendar,
|
||||
|
@ -169,20 +163,22 @@ var _default = {
|
|||
//打卡列表
|
||||
radioList: [{
|
||||
title: '上午上班',
|
||||
type: 'in'
|
||||
type: 'morning_on'
|
||||
}, {
|
||||
title: '上午下班',
|
||||
type: 'out'
|
||||
type: 'morning_off'
|
||||
}, {
|
||||
title: '下午上班',
|
||||
type: 'in'
|
||||
type: 'afternoon_on'
|
||||
}, {
|
||||
title: '下午下班',
|
||||
type: 'out'
|
||||
type: 'afternoon_off'
|
||||
}],
|
||||
//打卡类型
|
||||
radioIndex: 0,
|
||||
//当前选择
|
||||
curDate: '',
|
||||
//当前日期
|
||||
page: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
|
@ -190,21 +186,22 @@ var _default = {
|
|||
//工地列表
|
||||
worksiteIndex: -1,
|
||||
//当前选择
|
||||
date: getDate({
|
||||
format: true
|
||||
}),
|
||||
startDate: getDate('start'),
|
||||
beginDate: '',
|
||||
//开始日期
|
||||
endDate: '',
|
||||
//结束日期
|
||||
showCard: false //是否显示补卡
|
||||
};
|
||||
},
|
||||
onLoad: function onLoad(op) {
|
||||
if (op.userType !== '') {
|
||||
if (op.userType) {
|
||||
this.userType = op.userType;
|
||||
}
|
||||
if (op.date) {
|
||||
// 获取选择日期
|
||||
this.curDate = op.date;
|
||||
} else {
|
||||
var year = new Date().getFullYear();
|
||||
var month = new Date().getMonth() + 1;
|
||||
var day = new Date().getDate();
|
||||
this.curDate = "".concat(year, "-").concat(month < 10 ? '0' + month : month, "-").concat(day < 10 ? '0' + day : day);
|
||||
}
|
||||
// 获取工地列表
|
||||
this.getWorksiteList();
|
||||
},
|
||||
|
@ -242,6 +239,15 @@ var _default = {
|
|||
this.$requst.get('/api/v1/common/worksite-list').then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this.worksiteList = res.data.list;
|
||||
if (uni.getStorageSync('worksite_id')) {
|
||||
_this.worksiteIndex = _this.worksiteList.findIndex(function (item) {
|
||||
return item.id === uni.getStorageSync('worksite_id');
|
||||
});
|
||||
} else {
|
||||
_this.worksiteIndex = _this.worksiteList.findIndex(function (item) {
|
||||
return item.id === uni.getStorageSync('baseWorksiteId');
|
||||
});
|
||||
}
|
||||
_this.isLoding = true;
|
||||
}
|
||||
});
|
||||
|
@ -252,13 +258,30 @@ var _default = {
|
|||
this.radioIndex = index;
|
||||
}
|
||||
},
|
||||
// 获取选择时间
|
||||
getDate: function getDate(date) {
|
||||
console.log(date, '当前选择时间');
|
||||
},
|
||||
// 确认补卡
|
||||
submitEv: function submitEv() {
|
||||
this.showCard = false;
|
||||
var _this2 = this;
|
||||
var params = {
|
||||
day: this.curDate,
|
||||
worksite_id: this.worksiteList[this.worksiteIndex].id,
|
||||
type: this.radioList[this.radioIndex].type
|
||||
};
|
||||
this.$requst.post('/api/v1/worker/replenish', params).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this2.$toolAll.tools.showToast('补卡成功');
|
||||
_this2.showCard = false;
|
||||
// 获取状态列表
|
||||
_this2.$refs.signCalendar.getStatusObj();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取打卡列表
|
||||
getSignList: function getSignList() {
|
||||
var _this2 = this;
|
||||
var _this3 = this;
|
||||
var params = {
|
||||
page: this.page,
|
||||
size: this.size,
|
||||
|
@ -270,8 +293,8 @@ var _default = {
|
|||
this.$requst.post('/api/v1/worker/clock-list', params).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
console.log(res, '打卡记录');
|
||||
_this2.total = res.data.total;
|
||||
_this2.signList = _this2.signList.concat(res.data.list);
|
||||
_this3.total = res.data.total;
|
||||
_this3.signList = _this3.signList.concat(res.data.list);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -281,20 +304,6 @@ var _default = {
|
|||
this.page = 1;
|
||||
// 获取打卡列表
|
||||
this.getSignList();
|
||||
},
|
||||
// 选择开始日期
|
||||
beginDateChange: function beginDateChange(e) {
|
||||
this.beginDate = e.detail.value;
|
||||
this.page = 1;
|
||||
// 获取打卡列表
|
||||
this.getSignList();
|
||||
},
|
||||
// 选择结束日期
|
||||
endDateChange: function endDateChange(e) {
|
||||
this.endDate = e.detail.value;
|
||||
this.page = 1;
|
||||
// 获取打卡列表
|
||||
this.getSignList();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1 +1 @@
|
|||
<view class="pad-x120 data-v-11e99daa"><status-nav vue-id="2b49158a-1" navBarTitle="打卡记录" class="data-v-11e99daa" bind:__l="__l"></status-nav><view class="content data-v-11e99daa" style="{{'padding-top:'+(statusHeight+50+'px')+';'}}"><view class="screen-box screen-box-other data-v-11e99daa"><view class="item data-v-11e99daa"><picker class="font24 data-v-11e99daa" mode="selector" range="{{worksiteList}}" value="{{worksiteIndex}}" range-key="name" data-event-opts="{{[['change',[['bindWorksiteChange',['$event']]]]]}}" bindchange="__e"><view class="name data-v-11e99daa"><text class="{{['clips1','data-v-11e99daa',worksiteIndex==-1?'color-99':'']}}">{{worksiteIndex!==-1?worksiteList[worksiteIndex].name:'请选择工地'}}</text><image src="/static/icon/icon-arrow-02.png" mode="aspectFit" class="data-v-11e99daa"></image></view></picker></view><view data-event-opts="{{[['tap',[['e0',['$event']]]]]}}" class="item font26 color-blue data-v-11e99daa" bindtap="__e"><view class="name data-v-11e99daa" style="justify-content:center;">补卡操作</view></view></view><view class="sign-calendar data-v-11e99daa"><sign-calendar vue-id="2b49158a-2" class="data-v-11e99daa" bind:__l="__l"></sign-calendar></view><view class="sign-record-date font26 data-v-11e99daa">2022年12月08日 打卡情况</view><view class="sign-record sign-record-other bg-white data-v-11e99daa"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="item font26 data-v-11e99daa"><view class="info data-v-11e99daa"><text class="data-v-11e99daa">{{item.$orig.type_text+"打卡:"+item.g0}}</text><text class="data-v-11e99daa">{{"打卡工地:"+item.$orig.worksite_name}}</text></view><block wx:if="{{item.$orig.status==-1}}"><view class="state color-red data-v-11e99daa">{{item.$orig.status_text}}</view></block><block wx:if="{{item.$orig.status==0}}"><view class="state color-blue data-v-11e99daa">{{item.$orig.status_text}}</view></block><block wx:if="{{item.$orig.status==1}}"><view class="state data-v-11e99daa">{{item.$orig.status_text}}</view></block></view></block></view><view class="more-tips font24 data-v-11e99daa">{{signList.length==total?'没有更多数据了':'下滑获取更多'}}</view></view><block wx:if="{{showCard}}"><view class="pop-up-bg data-v-11e99daa"><view class="sign-cate bg-white data-v-11e99daa"><view class="title font34 data-v-11e99daa">请选择补卡时间</view><view class="txt font28 data-v-11e99daa"><block wx:for="{{radioList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['changeSignType',[index]]]]]}}" class="radio-item data-v-11e99daa" bindtap="__e"><view class="{{['data-v-11e99daa',radioIndex==index?'checked':'']}}"></view><view class="data-v-11e99daa">{{item.title+"打卡"}}</view></view></block></view><view class="sign-cate-btns color-white font30 data-v-11e99daa"><view data-event-opts="{{[['tap',[['e1',['$event']]]]]}}" class="btn data-v-11e99daa" bindtap="__e">取消</view><view data-event-opts="{{[['tap',[['submitEv',['$event']]]]]}}" class="btn data-v-11e99daa" bindtap="__e">确认</view></view></view></view></block><tabbar vue-id="2b49158a-3" userType="{{userType}}" current="2" class="data-v-11e99daa" bind:__l="__l"></tabbar></view>
|
||||
<view class="pad-x120 data-v-11e99daa"><status-nav vue-id="2b49158a-1" navBarTitle="打卡记录" class="data-v-11e99daa" bind:__l="__l"></status-nav><view class="content data-v-11e99daa" style="{{'padding-top:'+(statusHeight+50+'px')+';'}}"><view class="screen-box screen-box-other data-v-11e99daa"><view class="item data-v-11e99daa"><picker class="font24 data-v-11e99daa" mode="selector" range="{{worksiteList}}" value="{{worksiteIndex}}" range-key="name" data-event-opts="{{[['change',[['bindWorksiteChange',['$event']]]]]}}" bindchange="__e"><view class="name data-v-11e99daa"><text class="{{['clips1','data-v-11e99daa',worksiteIndex==-1?'color-99':'']}}">{{worksiteIndex!==-1?worksiteList[worksiteIndex].name:'请选择工地'}}</text><image src="/static/icon/icon-arrow-02.png" mode="aspectFit" class="data-v-11e99daa"></image></view></picker></view><view data-event-opts="{{[['tap',[['e0',['$event']]]]]}}" class="item font26 color-blue data-v-11e99daa" bindtap="__e"><view class="name data-v-11e99daa" style="justify-content:center;">补卡操作</view></view></view><view class="sign-calendar data-v-11e99daa"><sign-calendar bind:getDate="__e" vue-id="2b49158a-2" data-ref="signCalendar" data-event-opts="{{[['^getDate',[['getDate']]]]}}" class="data-v-11e99daa vue-ref" bind:__l="__l"></sign-calendar></view><view class="sign-record-date font26 data-v-11e99daa">{{$root.g0+'年'+$root.g1+'月'+$root.g2+'日'+" 打卡情况"}}</view><view class="sign-record sign-record-other bg-white data-v-11e99daa"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="item font26 data-v-11e99daa"><view class="info data-v-11e99daa"><text class="data-v-11e99daa">{{item.$orig.type_text+"打卡:"+item.g3}}</text><text class="data-v-11e99daa">{{"打卡工地:"+item.$orig.worksite_name}}</text></view><block wx:if="{{item.$orig.status==-1}}"><view class="state color-red data-v-11e99daa">{{item.$orig.status_text}}</view></block><block wx:if="{{item.$orig.status==0}}"><view class="state color-blue data-v-11e99daa">{{item.$orig.status_text}}</view></block><block wx:if="{{item.$orig.status==1}}"><view class="state data-v-11e99daa">{{item.$orig.status_text}}</view></block></view></block></view><view class="more-tips font24 data-v-11e99daa">{{signList.length==total?'没有更多数据了':'下滑获取更多'}}</view></view><block wx:if="{{showCard}}"><view class="pop-up-bg data-v-11e99daa"><view class="sign-cate bg-white data-v-11e99daa"><view class="title font34 data-v-11e99daa">请选择补卡时间</view><view class="txt font28 data-v-11e99daa"><block wx:for="{{radioList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['changeSignType',[index]]]]]}}" class="radio-item data-v-11e99daa" bindtap="__e"><view class="{{['data-v-11e99daa',radioIndex==index?'checked':'']}}"></view><view class="data-v-11e99daa">{{item.title}}</view></view></block></view><view class="sign-cate-btns color-white font30 data-v-11e99daa"><view data-event-opts="{{[['tap',[['e1',['$event']]]]]}}" class="btn data-v-11e99daa" bindtap="__e">取消</view><view data-event-opts="{{[['tap',[['submitEv',['$event']]]]]}}" class="btn data-v-11e99daa" bindtap="__e">确认</view></view></view></view></block><tabbar vue-id="2b49158a-3" userType="{{userType}}" current="2" class="data-v-11e99daa" bind:__l="__l"></tabbar></view>
|
|
@ -185,6 +185,7 @@ var _default = {
|
|||
//状态栏高度
|
||||
userType: 'director',
|
||||
//账户类型 工人:worker 负责人:director
|
||||
baseHttp: "".concat(getApp().globalData.hostapi),
|
||||
centerDetail: {},
|
||||
//工人信息
|
||||
reasonMsg: '',
|
||||
|
@ -198,6 +199,9 @@ var _default = {
|
|||
if (op.id) {
|
||||
this.id = op.id;
|
||||
}
|
||||
if (op.userType) {
|
||||
this.userType = op.userType;
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {
|
||||
// 获取工人信息
|
||||
|
@ -222,6 +226,12 @@ var _default = {
|
|||
if (res.code == 0) {
|
||||
console.log(res, '工人信息');
|
||||
_this.centerDetail = res.data;
|
||||
_this.centerDetail.id_front = _this.$toolAll.tools.handleImg(res.data.id_front);
|
||||
_this.centerDetail.account.id_front = _this.$toolAll.tools.handleImg(res.data.account.id_front);
|
||||
_this.centerDetail.id_back = _this.$toolAll.tools.handleImg(res.data.id_back);
|
||||
_this.centerDetail.account.id_back = _this.$toolAll.tools.handleImg(res.data.account.id_back);
|
||||
_this.centerDetail.bank_card_img = _this.$toolAll.tools.handleImg(res.data.bank_card_img);
|
||||
_this.centerDetail.account.bank_card_img = _this.$toolAll.tools.handleImg(res.data.account.bank_card_img);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -267,6 +277,15 @@ var _default = {
|
|||
closeReason: function closeReason() {
|
||||
this.ifReason = false;
|
||||
this.reasonMsg = '';
|
||||
},
|
||||
// 图片预览
|
||||
previewImageEv: function previewImageEv(url) {
|
||||
//uniapp预览轮播图
|
||||
uni.previewImage({
|
||||
current: 0,
|
||||
//预览图片的下标
|
||||
urls: [url] //预览图片的地址,必须要数组形式,如果不是数组形式就转换成数组形式就可以
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -330,9 +330,9 @@ var _default = {
|
|||
status: this.status
|
||||
};
|
||||
if (this.page == 1) this.signList = [];
|
||||
this.$requst.post('/api/v1/manager/clock-list', params).then(function (res) {
|
||||
this.$requst.post('/api/v1/manager/dimission-check-list', params).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
console.log(res, '打卡列表');
|
||||
console.log(res, '离职列表');
|
||||
_this3.total = res.data.total;
|
||||
var signArr = [];
|
||||
res.data.list.forEach(function (item) {
|
||||
|
|
|
@ -86,6 +86,20 @@
|
|||
"query": "userType=director",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "pagesB/quitApply/quitApply",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "pages/worker/sign/sign",
|
||||
"query": "userType=worker&apply=join",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue