2022-06-08 15:48:09 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view class="modultInfo">
|
|
|
|
|
|
<headers :showBack="true" :themeType="'white'">
|
|
|
|
|
|
<view class="headerName">
|
|
|
|
|
|
{{type==1?'合同':type==2?'体检':type==3?'保险':type==4?'安全教育':''}}
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</headers>
|
|
|
|
|
|
<view class="content">
|
|
|
|
|
|
<view class="info_wrap" v-if="type==1">
|
|
|
|
|
|
<view class="title">
|
|
|
|
|
|
<text class="state1" v-if="info.length==0">未签订</text>
|
|
|
|
|
|
<text class="state2" v-else>已签订</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="detailInfo" v-for="(item,index) in info" :key="index">
|
|
|
|
|
|
<view>合同编号:{{item.contractNumber}}</view>
|
|
|
|
|
|
<view>合同类型:{{item.contractType==1?'纸质合同':item.contractType==2?'电子合同':''}}</view>
|
|
|
|
|
|
<view>合同期限:{{item.laborContractType==1?'固定期限合同':item.laborContractType==2?'以完成一定工作为期限的合同':''}}</view>
|
|
|
|
|
|
<view>生效日期:{{item.contractBeginDate}}</view>
|
|
|
|
|
|
<view>失效日期:{{item.contractEndDate}}</view>
|
|
|
|
|
|
<view>工资核定方式:{{
|
2025-05-13 15:42:47 +08:00
|
|
|
|
item.wagesVerificationType == 1
|
|
|
|
|
|
? "按天"
|
|
|
|
|
|
: item.wagesVerificationType == 2
|
|
|
|
|
|
? "按小时"
|
|
|
|
|
|
: item.wagesVerificationType == 3
|
|
|
|
|
|
? "按月"
|
|
|
|
|
|
: item.wagesVerificationType == 4
|
|
|
|
|
|
? "按件"
|
|
|
|
|
|
: ""
|
|
|
|
|
|
}}</view>
|
|
|
|
|
|
<view>合同附件:</view>
|
|
|
|
|
|
<view class="file-item" v-for="(val, valIndex) in item.fileList" @click="handlePreview(val.url)" :key="valIndex">{{val.name}}</view>
|
2022-06-08 15:48:09 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="info_wrap" v-if="type==2">
|
|
|
|
|
|
<view class="title">
|
|
|
|
|
|
<text class="state1" v-if="info.length==0">未体检</text>
|
|
|
|
|
|
<text class="state2" v-else>已体检</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="detailInfo" v-for="(item,index) in info" :key="index">
|
|
|
|
|
|
<view>身高:{{item.personHeight}}cm</view>
|
|
|
|
|
|
<view>体重:{{item.personWeight}}kg</view>
|
|
|
|
|
|
<view>体检日期:{{item.physicalsTime}}</view>
|
|
|
|
|
|
<view>体检状态:{{item.state==1?'未体检':item.state==2?'体检合格':item.state==1?'体检不合格':''}}</view>
|
|
|
|
|
|
<view>结论:{{item.conclusion}}</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="info_wrap" v-if="type==3">
|
|
|
|
|
|
<!-- <view class="title">
|
|
|
|
|
|
<text class="state1" v-if="info.length==0">未购买</text>
|
|
|
|
|
|
<text class="state2" v-else>已购买</text>
|
|
|
|
|
|
</view> -->
|
|
|
|
|
|
<view class="detailInfo" v-for="(item,index) in info" :key="index">
|
|
|
|
|
|
<view>保险购买日期:{{item.insuranceTime}}</view>
|
|
|
|
|
|
<view>保险到期日期:{{item.expireTime}}</view>
|
|
|
|
|
|
<view>保险状态:{{item.state==1?'未购买':item.state==2?'已购买':''}}</view>
|
|
|
|
|
|
<view>险种:{{item.insuranceType}}</view>
|
|
|
|
|
|
<view>城乡居民医疗保险:{{item.medicalInsurance==1?'否':item.medicalInsurance==2?'是':''}}</view>
|
|
|
|
|
|
<view>城乡居民养老保险:{{item.endowmentInsurance==1?'否':item.endowmentInsurance==2?'是':''}}</view>
|
2025-05-13 15:42:47 +08:00
|
|
|
|
<view>保险附件:</view>
|
|
|
|
|
|
<view class="file-item" v-for="(val, valIndex) in item.fileList" @click="handlePreview(val.url)" :key="valIndex">{{val.name}}</view>
|
2022-06-08 15:48:09 +08:00
|
|
|
|
</view>
|
2024-07-03 17:56:30 +08:00
|
|
|
|
<view class="no_data" v-if="info.length == 0">
|
|
|
|
|
|
<image src="/static/noData.png"></image>
|
|
|
|
|
|
<view>暂无数据</view>
|
|
|
|
|
|
</view>
|
2022-06-08 15:48:09 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view class="info_wrap" v-if="type==4">
|
|
|
|
|
|
<view class="title">
|
|
|
|
|
|
<text class="state1" v-if="info.length==0">未培训</text>
|
|
|
|
|
|
<text class="state2" v-else>已培训</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="detailInfo" v-for="(item,index) in info" :key="index">
|
2024-07-03 17:56:30 +08:00
|
|
|
|
<!-- <view>培训类型: {{
|
2022-06-08 15:48:09 +08:00
|
|
|
|
item.eduType == 1
|
|
|
|
|
|
? "入场三级教育"
|
|
|
|
|
|
: item.eduType == 2
|
|
|
|
|
|
? "定期安全教育"
|
|
|
|
|
|
: item.eduType == 3
|
|
|
|
|
|
? "安全技术交底"
|
|
|
|
|
|
: item.eduType == 4
|
|
|
|
|
|
? "VR安全教育"
|
|
|
|
|
|
: ""
|
2024-07-03 17:56:30 +08:00
|
|
|
|
}}</view> -->
|
|
|
|
|
|
<view>培训日期:{{item.date}}</view>
|
|
|
|
|
|
<view>培训主题:{{item.subject}}</view>
|
|
|
|
|
|
<view>考试分数:{{item.score}}</view>
|
|
|
|
|
|
<view>是否合格:{{item.isPass == 1 ? "是":item.isPass == 0? "否":''}}</view>
|
2022-06-08 15:48:09 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
export default {
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
type: 1,
|
2024-07-03 17:56:30 +08:00
|
|
|
|
info: null,
|
|
|
|
|
|
workerId: ""
|
2022-06-08 15:48:09 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onLoad(option) {
|
|
|
|
|
|
this.type = Number(option.type);
|
2024-07-03 17:56:30 +08:00
|
|
|
|
this.workerId = option.workerId;
|
2022-06-08 15:48:09 +08:00
|
|
|
|
this.info = uni.getStorageSync('moduleInfo');
|
|
|
|
|
|
this.getFileInfo();
|
2024-07-03 17:56:30 +08:00
|
|
|
|
if(this.type == 4){ // 安全教育考试数据特殊处理
|
|
|
|
|
|
this.getExamDataList();
|
|
|
|
|
|
}
|
2022-06-08 15:48:09 +08:00
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2024-07-03 17:56:30 +08:00
|
|
|
|
// 获取考试数据
|
|
|
|
|
|
getExamDataList() {
|
|
|
|
|
|
this.sendRequest({
|
|
|
|
|
|
url: 'xmgl/workerInfo/getTrainRecordsByWorkerId',
|
|
|
|
|
|
method: 'post',
|
|
|
|
|
|
data: {
|
|
|
|
|
|
projectSn: JSON.parse(uni.getStorageSync('projectDetail')).projectSn,
|
|
|
|
|
|
workerId: this.workerId,
|
|
|
|
|
|
},
|
|
|
|
|
|
success: res => {
|
|
|
|
|
|
if(res.code == 200){
|
|
|
|
|
|
this.info = res.result;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2022-06-08 15:48:09 +08:00
|
|
|
|
//获取附件信息
|
|
|
|
|
|
getFileInfo() {
|
|
|
|
|
|
let data = JSON.parse(JSON.stringify(this.info))
|
|
|
|
|
|
if (this.type == 1) {
|
|
|
|
|
|
//获取合同照片
|
|
|
|
|
|
if (data.length > 0 && data[0].imageUrl) {
|
|
|
|
|
|
let arr = data[0].imageUrl.split(",");
|
|
|
|
|
|
let fileList = [];
|
|
|
|
|
|
arr.forEach((item) => {
|
|
|
|
|
|
let valArr = item.split("*");
|
|
|
|
|
|
fileList.push({
|
|
|
|
|
|
name: valArr[0],
|
|
|
|
|
|
url: valArr[1]
|
|
|
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
data[0].fileList = fileList;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
if (data.length > 0) {
|
|
|
|
|
|
data[0].fileList = [];
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-05-13 15:42:47 +08:00
|
|
|
|
if (this.type == 3) {
|
|
|
|
|
|
//获取保险照片
|
|
|
|
|
|
if (data.length > 0 && data[0].photoUrl) {
|
|
|
|
|
|
let arr = data[0].photoUrl.split(",");
|
|
|
|
|
|
let fileList = [];
|
|
|
|
|
|
arr.forEach((item) => {
|
|
|
|
|
|
let valArr = item.split("*");
|
|
|
|
|
|
fileList.push({
|
|
|
|
|
|
name: valArr[0],
|
|
|
|
|
|
url: valArr[1]
|
|
|
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
data[0].fileList = fileList;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
if (data.length > 0) {
|
|
|
|
|
|
data[0].fileList = [];
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-06-08 15:48:09 +08:00
|
|
|
|
this.info = data;
|
|
|
|
|
|
},
|
|
|
|
|
|
//预览文件
|
|
|
|
|
|
handlePreview(url) {
|
|
|
|
|
|
let type = url.split('.')[1];
|
|
|
|
|
|
if (type == 'doc' || type == 'xls' || type == 'ppt' || type == 'pdf' || type == 'docx' || type == 'xlsx' || type ==
|
|
|
|
|
|
'pptx') {
|
|
|
|
|
|
uni.openDocument({
|
|
|
|
|
|
filePath: this.url_config + 'image/' + url,
|
|
|
|
|
|
})
|
|
|
|
|
|
}else{
|
|
|
|
|
|
let fileList = [];
|
|
|
|
|
|
fileList = [this.url_config + 'image/' + url];
|
|
|
|
|
|
uni.previewImage({
|
|
|
|
|
|
current: 0,
|
|
|
|
|
|
urls: fileList
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
.info_wrap {
|
|
|
|
|
|
text-align: center;
|
2024-07-03 17:56:30 +08:00
|
|
|
|
padding-bottom: 2rpx;
|
2022-06-08 15:48:09 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.detailInfo {
|
|
|
|
|
|
text-align: left;
|
|
|
|
|
|
padding: 10px 30rpx;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
margin: 10px 0 20px;
|
|
|
|
|
|
box-shadow: 0 0px 10px rgba(220, 220, 220, 0.8);
|
|
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
|
line-height: 28px;
|
|
|
|
|
|
}
|
2024-07-03 17:56:30 +08:00
|
|
|
|
.no_data{
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
top: 35%;
|
|
|
|
|
|
// transform: translateY(-50%);
|
|
|
|
|
|
left: 50%;
|
|
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
|
padding-top: 60rpx;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
color: rgba(0,0,0,0.5);
|
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
|
uni-image{
|
|
|
|
|
|
width: 162rpx;
|
|
|
|
|
|
height: 130rpx;
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
|
margin-bottom: 40rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-06-08 15:48:09 +08:00
|
|
|
|
.info_wrap .title {
|
|
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
|
margin-top: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.title .state1 {
|
|
|
|
|
|
color: red;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.title .state2 {
|
|
|
|
|
|
color: #4181FE;
|
|
|
|
|
|
}
|
2025-05-13 15:42:47 +08:00
|
|
|
|
.file-item{
|
|
|
|
|
|
color: #4181FE;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
2022-06-08 15:48:09 +08:00
|
|
|
|
</style>
|