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