feat: 新项目环境、内容添加
This commit is contained in:
parent
f3e54fc053
commit
8cf07f81c9
12
main.js
12
main.js
@ -32,7 +32,8 @@ Vue.component('uni-icons2', uniIcons2)
|
|||||||
// Vue.prototype.COMPANY = "zjwj"
|
// Vue.prototype.COMPANY = "zjwj"
|
||||||
// Vue.prototype.COMPANY = "sccr"
|
// Vue.prototype.COMPANY = "sccr"
|
||||||
// Vue.prototype.COMPANY = "agjt" // 鞍钢集团环境
|
// Vue.prototype.COMPANY = "agjt" // 鞍钢集团环境
|
||||||
Vue.prototype.COMPANY = "" // 标准版
|
Vue.prototype.COMPANY = "cpgs" // 成平高速环境
|
||||||
|
// Vue.prototype.COMPANY = "" // 标准版
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// 开发环境
|
// 开发环境
|
||||||
console.log('开发环境')
|
console.log('开发环境')
|
||||||
@ -41,14 +42,14 @@ if (process.env.NODE_ENV === 'development') {
|
|||||||
// Vue.prototype.url_config = 'http://42.180.188.17:11211/' // 鞍钢测试地址
|
// Vue.prototype.url_config = 'http://42.180.188.17:11211/' // 鞍钢测试地址
|
||||||
// Vue.prototype.url_config = 'http://182.90.224.237:51234/' //雄哥内网穿透地址
|
// Vue.prototype.url_config = 'http://182.90.224.237:51234/' //雄哥内网穿透地址
|
||||||
// Vue.prototype.url_config = 'http://jxj.zhgdyun.com:61212/' //杰哥内网穿透地址
|
// Vue.prototype.url_config = 'http://jxj.zhgdyun.com:61212/' //杰哥内网穿透地址
|
||||||
// Vue.prototype.url_config = ' http://192.168.34.221:28888/' //郭圣雄本地
|
// Vue.prototype.url_config = 'http://192.168.34.221:28888/' //郭圣雄本地
|
||||||
Vue.prototype.url_config = ' http://192.168.34.221:9111/' //郭圣雄本地
|
// Vue.prototype.url_config = 'http://192.168.34.221:9111/' //郭圣雄本地
|
||||||
// Vue.prototype.url_config = 'http://182.90.224.237:51234/' //郭圣雄本地
|
// Vue.prototype.url_config = 'http://182.90.224.237:51234/' //郭圣雄本地
|
||||||
// Vue.prototype.url_config = 'http://192.168.34.155:19111/' //彭洁本地
|
Vue.prototype.url_config = 'http://192.168.34.155:19111/' //彭洁本地
|
||||||
// Vue.prototype.work_url = 'http://47.93.215.234:19997' // 工作流线上地址(弃用)
|
// Vue.prototype.work_url = 'http://47.93.215.234:19997' // 工作流线上地址(弃用)
|
||||||
// Vue.prototype.work_url = 'http://42.180.188.17:19997' // 工作流线上地址
|
// Vue.prototype.work_url = 'http://42.180.188.17:19997' // 工作流线上地址
|
||||||
// Vue.prototype.work_url = 'http://42.180.188.17:19097' // 工作流测试地址
|
// Vue.prototype.work_url = 'http://42.180.188.17:19097' // 工作流测试地址
|
||||||
Vue.prototype.work_url = 'http://192.168.34.175:5173' // 工作流地址
|
// Vue.prototype.work_url = 'http://192.168.34.175:5173' // 工作流地址
|
||||||
// Vue.prototype.work_url = 'http://192.168.34.138:5173' // 工作流地址
|
// Vue.prototype.work_url = 'http://192.168.34.138:5173' // 工作流地址
|
||||||
// Vue.prototype.work_url = 'http://139.9.66.234:5173' // 工作流地址
|
// Vue.prototype.work_url = 'http://139.9.66.234:5173' // 工作流地址
|
||||||
// Vue.prototype.work_url = 'http://192.168.34.126:5173' // 工作流地址
|
// Vue.prototype.work_url = 'http://192.168.34.126:5173' // 工作流地址
|
||||||
@ -84,6 +85,7 @@ if (process.env.NODE_ENV === 'development') {
|
|||||||
// Vue.prototype.url_config = 'http://118.121.198.147:23232'//成润正式
|
// Vue.prototype.url_config = 'http://118.121.198.147:23232'//成润正式
|
||||||
// Vue.prototype.url_config = 'http://huli.zjzhiliao.com/jxjgdapi'//金林湾测试
|
// Vue.prototype.url_config = 'http://huli.zjzhiliao.com/jxjgdapi'//金林湾测试
|
||||||
// Vue.prototype.url_config = 'http://8.136.222.164:8808/'//中科安信
|
// Vue.prototype.url_config = 'http://8.136.222.164:8808/'//中科安信
|
||||||
|
// Vue.prototype.url_config = 'http://101.43.164.214:11111/'// 百色三标段
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
14
pages.json
14
pages.json
@ -247,6 +247,20 @@
|
|||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/projectEnd/laborManage/searchTeam/addAttendance",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/projectEnd/laborManage/searchTeam/addAttendanceManage",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/projectEnd/laborManage/clockIn",
|
"path": "pages/projectEnd/laborManage/clockIn",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
592
pages/projectEnd/laborManage/searchTeam/addAttendance.vue
Normal file
592
pages/projectEnd/laborManage/searchTeam/addAttendance.vue
Normal file
@ -0,0 +1,592 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 新增问题 -->
|
||||||
|
<view class="addIssue">
|
||||||
|
<view class="fixedheader">
|
||||||
|
<headers :showBack="true">
|
||||||
|
<view class="headerName">
|
||||||
|
{{pageTitle}}
|
||||||
|
</view>
|
||||||
|
</headers>
|
||||||
|
</view>
|
||||||
|
<view class="content" :style="{paddingTop: mobileTopHeight + 50 + 'px'}">
|
||||||
|
<view class="type flex">
|
||||||
|
<view class="name"><text class="star">*</text>通行设备:</view>
|
||||||
|
<picker @change="(e)=>bindPickerChange(e,1)" :value="passEquipIndex" class="picker"
|
||||||
|
:range="devEquipList" range-key="devName">
|
||||||
|
<view class="uni-input uni-select cl" v-if="passEquipIndex==null && !defaultDevEquip">
|
||||||
|
请选择 <image class="icon-down" src="/static/icon-down-black.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="uni-input uni-select" v-else>
|
||||||
|
{{defaultDevEquip || devEquipList[passEquipIndex].devName}}
|
||||||
|
<image class="icon-down" src="/static/icon-down-black.png"></image>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
<view class="type flex">
|
||||||
|
<view class="name"><text class="star">*</text>通行方向:</view>
|
||||||
|
<picker @change="(e)=>bindPickerChange(e,2)" :value="passDirectionIndex" class="picker"
|
||||||
|
:range="passDirectionList" range-key="name">
|
||||||
|
<view class="uni-input uni-select cl" v-if="form.direction==null">
|
||||||
|
请选择 <image class="icon-down" src="/static/icon-down-black.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="uni-input uni-select" v-else>
|
||||||
|
{{form.direction==1?'进':form.direction==2?'出':''}}
|
||||||
|
<image class="icon-down" src="/static/icon-down-black.png"></image>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
<view class="type flex">
|
||||||
|
<view class="name"><text class="star">*</text>通行时间:</view>
|
||||||
|
<dateTimePiccker :placeholder="'请选择'" :start="startTime" fields="second"
|
||||||
|
:default-value="form.passTime" @change="bindPickerChange($event,'passTime')"
|
||||||
|
class="dateTimePiccker">
|
||||||
|
<!-- <view class="uni-input uni-select cl" v-if="form.inspectTime===''">
|
||||||
|
请选择 <image class="icon-right" src="/static/icon-right.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="uni-input uni-select" v-else>{{form.inspectTime}}
|
||||||
|
<image class="icon-right" src="/static/icon-right.png"></image>
|
||||||
|
</view> -->
|
||||||
|
</dateTimePiccker>
|
||||||
|
<!-- <picker @change="(e)=>bindPickerChange(e,4)" mode="date" :value="form.inspectTime" class="picker">
|
||||||
|
<view class="uni-input uni-select cl" v-if="form.inspectTime===''">
|
||||||
|
请选择 <image class="icon-down" src="/static/icon-down-black.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="uni-input uni-select" v-else>{{form.inspectTime}}
|
||||||
|
<image class="icon-down" src="/static/icon-down-black.png"></image>
|
||||||
|
</view>
|
||||||
|
</picker> -->
|
||||||
|
</view>
|
||||||
|
<view class="type flex">
|
||||||
|
<view class="name"><text class="star">*</text>通行方式:</view>
|
||||||
|
<picker @change="(e)=>bindPickerChange(e,3)" :value="passTypeIndex" class="picker"
|
||||||
|
:range="passTypeList" range-key="name">
|
||||||
|
<view class="uni-input uni-select cl" v-if="form.passType==null">
|
||||||
|
请选择 <image class="icon-down" src="/static/icon-down-black.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="uni-input uni-select" v-else>
|
||||||
|
{{form.passType==1?'IC卡':form.passType==2?'人脸识别':form.passType==3?'指纹识别':form.passType==5?'二维码':form.passType==6?'蓝牙':''}}
|
||||||
|
<image class="icon-down" src="/static/icon-down-black.png"></image>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="type flex3">
|
||||||
|
<view class="name">补充说明:</view>
|
||||||
|
<textarea class="textarea" maxlength="-1" placeholder-class="cl" name="inspectContent"
|
||||||
|
@input='supplementTextarea' :value="form.dangerDesc" placeholder="请输入"></textarea>
|
||||||
|
</view> -->
|
||||||
|
<view class="addSaveBtn" @click="addSaveBtn">新增保存</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import dateTimePiccker from '@/components/dateTimePicker/index.vue'
|
||||||
|
import {
|
||||||
|
dateformat
|
||||||
|
} from "@/utils/tool.js"
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
dateTimePiccker
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
passTypeList: [{
|
||||||
|
name: 'IC卡',
|
||||||
|
value: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '人脸识别',
|
||||||
|
value: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '指纹识别',
|
||||||
|
value: 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '二维码',
|
||||||
|
value: 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '蓝牙',
|
||||||
|
value: 6
|
||||||
|
}
|
||||||
|
],
|
||||||
|
passTypeIndex: null,
|
||||||
|
passDirectionList: [{
|
||||||
|
name: '进',
|
||||||
|
value: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '出',
|
||||||
|
value: 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
passDirectionIndex: null,
|
||||||
|
defaultDevEquip: "",
|
||||||
|
devEquipList: [],
|
||||||
|
passEquipIndex: null,
|
||||||
|
mobileTopHeight: 0,
|
||||||
|
startTime: this.getDate({
|
||||||
|
format: true,
|
||||||
|
}),
|
||||||
|
form: {
|
||||||
|
passTime: "",
|
||||||
|
passType: null,
|
||||||
|
direction: null,
|
||||||
|
devCode: ""
|
||||||
|
},
|
||||||
|
workerInfo: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
this.pageTitle = option.type == 'add' ? '添加补卡' : '添加补卡';
|
||||||
|
this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn;
|
||||||
|
this.userInfo = JSON.parse(uni.getStorageSync('userInfo'));
|
||||||
|
this.workerInfo = JSON.parse(decodeURIComponent(option.item));
|
||||||
|
this.getPassEquipList();
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
var that = this
|
||||||
|
uni.getSystemInfo({
|
||||||
|
success(res) {
|
||||||
|
that.mobileTopHeight = res.statusBarHeight ? res.statusBarHeight : 0;
|
||||||
|
uni.setStorageSync('systemInfo', res)
|
||||||
|
console.log(res)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
console.log('this.mobileTopHeight', this.mobileTopHeight)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//获取通行设备
|
||||||
|
getPassEquipList() {
|
||||||
|
this.sendRequest({
|
||||||
|
url: 'xmgl/ufaceDev/list',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
projectSn: this.projectSn
|
||||||
|
},
|
||||||
|
success: res => {
|
||||||
|
console.log(res.result, '通行设备')
|
||||||
|
if (res.result.length > 0) {
|
||||||
|
this.devEquipList = res.result;
|
||||||
|
} else {
|
||||||
|
this.devEquipList = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getDate(type) {
|
||||||
|
const date = new Date();
|
||||||
|
let year = date.getFullYear();
|
||||||
|
let month = date.getMonth() + 1;
|
||||||
|
let day = date.getDate();
|
||||||
|
if (type === 'start') {
|
||||||
|
year = year;
|
||||||
|
} else if (type === 'end') {
|
||||||
|
// year = year + 2;
|
||||||
|
}
|
||||||
|
month = month > 9 ? month : '0' + month;
|
||||||
|
day = day > 9 ? day : '0' + day;
|
||||||
|
return `${year}-${month}-${day}`;
|
||||||
|
},
|
||||||
|
//下拉选择回显
|
||||||
|
bindPickerChange(e, type) {
|
||||||
|
console.log(e)
|
||||||
|
if (type == 1) {
|
||||||
|
this.passEquipIndex = e.detail.value;
|
||||||
|
this.form.devCode = this.devEquipList[e.detail.value].devSn;
|
||||||
|
} else if (type == 2) {
|
||||||
|
this.passDirectionIndex = e.detail.value;
|
||||||
|
this.form.direction = this.passDirectionList[e.detail.value].value;
|
||||||
|
} else if (type == 3) {
|
||||||
|
this.passTypeIndex = e.detail.value;
|
||||||
|
this.form.passType = this.passTypeList[e.detail.value].value
|
||||||
|
} else if (type == 'passTime') {
|
||||||
|
this.form.passTime = e.f3;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//新增保存
|
||||||
|
async addSaveBtn() {
|
||||||
|
console.log(this.workerInfo,777888)
|
||||||
|
console.log(this.form,888999)
|
||||||
|
let data = JSON.parse(JSON.stringify(this.form));
|
||||||
|
if (!data.devCode) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请选择通行设备',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!data.direction) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请选择通行方向',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!data.passTime) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请选择通行时间',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!data.passType) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请选择通行方式',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let requestData = {
|
||||||
|
...data,
|
||||||
|
faceUrl: this.workerInfo.fieldAcquisitionUrl,
|
||||||
|
idCard: this.workerInfo.idCard,
|
||||||
|
projectCode: this.projectSn
|
||||||
|
}
|
||||||
|
this.sendRequest({
|
||||||
|
url: 'xmgl/itbgp/api/passRecord',
|
||||||
|
method: 'post',
|
||||||
|
data: requestData,
|
||||||
|
success: (res) => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.status == 1) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '保存成功'
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
})
|
||||||
|
}, 1200)
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.fixedheader {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 2;
|
||||||
|
|
||||||
|
.headerName {
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab {
|
||||||
|
width: 100%;
|
||||||
|
height: 45px;
|
||||||
|
text-align: center;
|
||||||
|
box-shadow: 0 0 10px rgba(194, 194, 194, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabType {
|
||||||
|
width: 50%;
|
||||||
|
line-height: 43px;
|
||||||
|
border-bottom: 1px solid rgba(194, 194, 194, 0.2);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.noCheckTab {
|
||||||
|
padding-bottom: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lagCss {
|
||||||
|
width: 180px;
|
||||||
|
height: 61px;
|
||||||
|
background: #fff;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 29px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add2 {
|
||||||
|
width: 120px;
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
background: #4181fe;
|
||||||
|
border-radius: 25px;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 0px 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.point {
|
||||||
|
height: 20px;
|
||||||
|
width: 20px;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex2 {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex3 {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 20px 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.type {
|
||||||
|
font-size: 30rpx;
|
||||||
|
line-height: 40px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
/* border-bottom: 1px solid rgba(194, 194, 194, 0.2); */
|
||||||
|
}
|
||||||
|
|
||||||
|
.type .name {
|
||||||
|
margin-right: 6px;
|
||||||
|
width: 176rpx;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radio-wrap {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.radio {
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.accessory {
|
||||||
|
width: 100%;
|
||||||
|
height: 70px;
|
||||||
|
padding: 0 10px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accessoryImg {
|
||||||
|
width: 110rpx;
|
||||||
|
height: 60px;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.picker {
|
||||||
|
width: 70%;
|
||||||
|
border: 1px solid rgba(42, 43, 91, 0.3);
|
||||||
|
padding: 0px 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-input {
|
||||||
|
line-height: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.textarea {
|
||||||
|
width: calc(79% - 32px);
|
||||||
|
border-radius: 5px;
|
||||||
|
border: 1px solid rgba(42, 43, 91, 0.3);
|
||||||
|
padding: 8px 15px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inpuStyle {
|
||||||
|
width: calc(80% - 35px);
|
||||||
|
border-radius: 20px;
|
||||||
|
border: 1px solid rgba(42, 43, 91, 0.3);
|
||||||
|
padding: 8px 15px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
height: 35px;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cl {
|
||||||
|
font-size: 30rpx;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.imgBox_wrap {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin-top: 10px;
|
||||||
|
width: 75%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.imgBox {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
display: inline-flex;
|
||||||
|
position: relative;
|
||||||
|
margin-right: 15px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
|
||||||
|
.img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.addImgBox {
|
||||||
|
border: 1px solid rgba(42, 43, 91, 0.1);
|
||||||
|
background-color: #f6f5f8;
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
.icon-add {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.unitDialog {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 111;
|
||||||
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.unitContent {
|
||||||
|
width: 85%;
|
||||||
|
height: 70%;
|
||||||
|
margin: 25% auto 0;
|
||||||
|
background-color: #fff;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 20px 30rpx;
|
||||||
|
border-radius: 5px;
|
||||||
|
box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs {
|
||||||
|
border-bottom: 1px solid rgba(153, 153, 153, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs_name {
|
||||||
|
width: 40%;
|
||||||
|
text-align: center;
|
||||||
|
padding: 5px 10rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkName {
|
||||||
|
border-bottom: 2px solid #4181FE;
|
||||||
|
color: #4181FE;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noCheckName {
|
||||||
|
padding-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.unitList {
|
||||||
|
margin: 10px 0;
|
||||||
|
font-size: 30rpx;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list_val {
|
||||||
|
padding: 8px 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg_999 {
|
||||||
|
background-color: rgba(153, 153, 153, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ellipsis {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status {
|
||||||
|
color: #007AFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.addSaveBtn {
|
||||||
|
margin: 30px auto;
|
||||||
|
width: 60%;
|
||||||
|
padding: 10px 0;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #4181FE;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 34rpx;
|
||||||
|
border-radius: 30px;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
box-shadow: 0 3px 10px rgba(65, 129, 254, 0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.addSaveBtn:active {
|
||||||
|
background-color: rgba(65, 129, 254, 0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.radio-box {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radio-item {
|
||||||
|
display: flex;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
|
||||||
|
/deep/ .uni-radio-input {
|
||||||
|
width: 32rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.radio-text {
|
||||||
|
height: 72rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.butA {
|
||||||
|
display: flex;
|
||||||
|
// position: absolute;
|
||||||
|
top: 60%;
|
||||||
|
|
||||||
|
width: 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-right {
|
||||||
|
margin-left: 16rpx;
|
||||||
|
width: 16rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dateTimePiccker {
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 5px;
|
||||||
|
width: 67%;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
309
pages/projectEnd/laborManage/searchTeam/addAttendanceManage.vue
Normal file
309
pages/projectEnd/laborManage/searchTeam/addAttendanceManage.vue
Normal file
@ -0,0 +1,309 @@
|
|||||||
|
<template>
|
||||||
|
<view class="fullHeight">
|
||||||
|
<view class="" style="position: fixed; top: 0; left: 0; width: 100%; z-index: 10;background-color: #fff;">
|
||||||
|
<headers :showBack="true" class="fixedHeaderBox">
|
||||||
|
<view class="headerName">
|
||||||
|
考勤记录
|
||||||
|
</view>
|
||||||
|
</headers>
|
||||||
|
<view class="searchBox selectContent" :style="{ 'padding-top': (statusBarHeight+52) + 'px' }">
|
||||||
|
<text>考勤日期:</text>
|
||||||
|
<picker mode="date" @change="changeDate" :value="searchForm.attendanceDate" class="selectItem">
|
||||||
|
<view class="selectVideoBox">
|
||||||
|
<text class="videoName">{{ searchForm.attendanceDate }}</text>
|
||||||
|
<uni-icons class="arrow" type="arrowdown" size="15"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
<!-- <picker mode="selector" :range="personTypeArr" @change="changePersonType" range-key="name"
|
||||||
|
:value="personTypeIndex" style="margin-left:10px" class="selectItem">
|
||||||
|
<view class="selectVideoBox">
|
||||||
|
<text class="videoName">{{ personTypeArr[personTypeIndex].name }}</text>
|
||||||
|
<uni-icons class="arrow" type="arrowdown" size="15"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</picker> -->
|
||||||
|
</view>
|
||||||
|
<!-- <view class="middleBox" :style="{ 'padding-top': (statusBarHeight+52+40) + 'px' }">
|
||||||
|
<view class="box">
|
||||||
|
<view class="num">
|
||||||
|
{{ statictisData.total_person }}
|
||||||
|
</view>
|
||||||
|
<view class="txt">
|
||||||
|
出勤人数
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="box">
|
||||||
|
<view class="num">
|
||||||
|
{{ searchForm.personType == 1 ? statictisData.totalTeamNum : statictisData.totalDepartmentNum }}
|
||||||
|
</view>
|
||||||
|
<view class="txt">
|
||||||
|
{{ searchForm.personType == 1 ? '出勤班组' : '出勤部门' }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
<view class="listBox" style="padding-top: 100px;">
|
||||||
|
<!-- @click="searchPerson(item.id)" -->
|
||||||
|
<view class="personItem" v-for="item in list" :key="item.id">
|
||||||
|
<image v-if="item.fieldAcquisitionUrl" :src="url_config+'image/'+item.fieldAcquisitionUrl"
|
||||||
|
class="profile_photo"></image>
|
||||||
|
<image v-else src="/static/profile_photo.png" class="profile_photo"></image>
|
||||||
|
<view class="personInfo">
|
||||||
|
<view class="name">
|
||||||
|
{{ item.workerName }}
|
||||||
|
</view>
|
||||||
|
<view class="teamName">
|
||||||
|
{{ item.teamName ? item.teamName : item.departmentName }}
|
||||||
|
</view>
|
||||||
|
<view class="small">
|
||||||
|
{{ item.sex == 2 ? '女' : '男' }} {{ item.age }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <image src="/static/icon-right.png" class="icon-right"></image> -->
|
||||||
|
</view>
|
||||||
|
<view class="placeholderBox" v-show="list.length===0">
|
||||||
|
<image src="/static/noData.png" class="noDataImg"></image>
|
||||||
|
<view class="text">
|
||||||
|
暂无数据
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="loadMoreBox" v-if="isLoadMore&&list.length>0">
|
||||||
|
<uni-load-more :status="loadStatus" iconType="auto"></uni-load-more>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import headers from "@/components/headers/headers.vue"
|
||||||
|
import {
|
||||||
|
GetDateStr
|
||||||
|
} from "@/static/js/util.js"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
headers
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchForm: {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
projectSn: "",
|
||||||
|
attendanceDate: ''
|
||||||
|
},
|
||||||
|
projectDetail: {},
|
||||||
|
list: [],
|
||||||
|
statusBarHeight: 0,
|
||||||
|
loadStatus: 'more',
|
||||||
|
isLoadMore: false,
|
||||||
|
personTypeArr: [{
|
||||||
|
name: '施工人员',
|
||||||
|
value: 1
|
||||||
|
}, {
|
||||||
|
name: '管理人员',
|
||||||
|
value: 2
|
||||||
|
}],
|
||||||
|
personTypeIndex: 0,
|
||||||
|
statictisData: {
|
||||||
|
totalDepartmentNum: 0,
|
||||||
|
totalTeamNum: 0,
|
||||||
|
total_person: 0,
|
||||||
|
},
|
||||||
|
workerInfo: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
this.workerInfo = JSON.parse(decodeURIComponent(option.item));
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight
|
||||||
|
this.projectDetail = JSON.parse(uni.getStorageSync('projectDetail'))
|
||||||
|
this.searchForm.projectSn = this.projectDetail.projectSn
|
||||||
|
this.searchForm.attendanceDate = GetDateStr(0, '-')
|
||||||
|
this.loadData()
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
uni.removeStorageSync('person')
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
|
||||||
|
this.isLoadMore = true
|
||||||
|
this.searchForm.pageNo += 1
|
||||||
|
this.loadData()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.searchForm.pageNo = 1
|
||||||
|
this.list = []
|
||||||
|
this.loadData()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
changeDate(e) {
|
||||||
|
this.searchForm.attendanceDate = e.target.value
|
||||||
|
this.list = []
|
||||||
|
this.searchForm.pageNo = 1
|
||||||
|
this.loadData()
|
||||||
|
},
|
||||||
|
changePersonType(e) {
|
||||||
|
this.personTypeIndex = e.target.value
|
||||||
|
this.searchForm.personType = this.personTypeArr[this.personTypeIndex].value
|
||||||
|
this.list = []
|
||||||
|
this.searchForm.pageNo = 1
|
||||||
|
this.loadData()
|
||||||
|
},
|
||||||
|
searchPerson(id) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: './searchTeam/personDetail?id=' + id
|
||||||
|
})
|
||||||
|
},
|
||||||
|
loadData() {
|
||||||
|
var that = this
|
||||||
|
let requestData = {
|
||||||
|
...this.searchForm,
|
||||||
|
personSn: this.workerInfo.personSn
|
||||||
|
}
|
||||||
|
this.sendRequest({
|
||||||
|
url: 'xmgl/workerInfo/selectAttendanceWorkerListByDate',
|
||||||
|
data: requestData,
|
||||||
|
method: "POST",
|
||||||
|
success(res) {
|
||||||
|
that.statictisData = res.result.count
|
||||||
|
that.list = that.list.concat(res.result.page.records)
|
||||||
|
if (res.result.page.records.length < that.searchForm
|
||||||
|
.pageSize) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
|
||||||
|
that.isLoadMore = true
|
||||||
|
that.loadStatus = 'nomore'
|
||||||
|
} else {
|
||||||
|
that.isLoadMore = false
|
||||||
|
// that.loadStatus='more'
|
||||||
|
}
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
console.log('that.isLoadMore', that.isLoadMore)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.searchBox {
|
||||||
|
// background-color: #2b8df3;
|
||||||
|
padding: 0 15px 5px;
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectContent {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
.selectItem {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.listBox {
|
||||||
|
margin: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.personItem {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
box-shadow: 0px 4px 13px 0px rgba(212, 220, 236, 0.53);
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
padding: 15px;
|
||||||
|
border-radius: 8px;
|
||||||
|
// padding: 0 15px;
|
||||||
|
font-size: 15px;
|
||||||
|
|
||||||
|
.teamName {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.small {
|
||||||
|
font-size: 12px;
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.profile_photo {
|
||||||
|
width: 50px;
|
||||||
|
height: 60px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-right {
|
||||||
|
position: absolute;
|
||||||
|
width: 8px;
|
||||||
|
height: 14px;
|
||||||
|
right: 15px;
|
||||||
|
top: calc(50% - 7px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectVideoBox {
|
||||||
|
border: 1px solid rgba(42, 43, 91, 0.2);
|
||||||
|
border-radius: 18px;
|
||||||
|
height: 35px;
|
||||||
|
font-size: 15px;
|
||||||
|
// display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.videoName {
|
||||||
|
padding: 0 12px 0 15px;
|
||||||
|
// border-right: 1px solid rgba(42, 43, 91, 0.2);
|
||||||
|
line-height: 35px;
|
||||||
|
height: 35px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.arrow {
|
||||||
|
padding: 0 12px 0 2px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.middleBox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin: 5px 15px 10px;
|
||||||
|
|
||||||
|
.box {
|
||||||
|
flex: 1;
|
||||||
|
// display: inline-flex;
|
||||||
|
// align-items: center;
|
||||||
|
// height: 65px;
|
||||||
|
padding: 4px 0 6px;
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.txt {
|
||||||
|
color: rgba(55, 45, 102, 0.6);
|
||||||
|
font-size: 13px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.num {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.box {
|
||||||
|
box-shadow: 0 4px 24px 0px rgba(212, 220, 236, 0.69);
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -103,6 +103,11 @@
|
|||||||
src="../../../../static/personManage/qrCode.png"></image>
|
src="../../../../static/personManage/qrCode.png"></image>
|
||||||
<text>二维码</text>
|
<text>二维码</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="flex item" @click="showItemDetails(6)" v-if="COMPANY == 'cpgs'">
|
||||||
|
<image class="margin_r_5" style="width: 40rpx;height:40rpx"
|
||||||
|
src="../../../../static/personManage/cyjl.png"></image>
|
||||||
|
<text>考勤录入</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="log_wrap">
|
<view class="log_wrap">
|
||||||
<view class="flex" @click="showInfoList(1)">
|
<view class="flex" @click="showInfoList(1)">
|
||||||
@ -296,6 +301,16 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="log_wrap" v-if="COMPANY == 'cpgs'">
|
||||||
|
<view class="flex" @click="showInfoList(6)">
|
||||||
|
<view class="flex">
|
||||||
|
<image class="margin_r_5" style="width: 34rpx;height:34rpx"
|
||||||
|
src="../../../../static/personManage/zs.png"></image>
|
||||||
|
<text class="title">考勤记录</text>
|
||||||
|
</view>
|
||||||
|
<view v-if="false">添加</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -314,6 +329,7 @@
|
|||||||
qrUrl: '此二维码仅供展示',
|
qrUrl: '此二维码仅供展示',
|
||||||
workerId: 0,
|
workerId: 0,
|
||||||
operateType: false,
|
operateType: false,
|
||||||
|
originWorkerInfo: {}, // 原始基本信息
|
||||||
workerInfo: {}, //基本信息
|
workerInfo: {}, //基本信息
|
||||||
certificateList: [], //资格证书
|
certificateList: [], //资格证书
|
||||||
workExperienceList: [], //从业信息
|
workExperienceList: [], //从业信息
|
||||||
@ -414,6 +430,7 @@
|
|||||||
},
|
},
|
||||||
success: res => {
|
success: res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
this.originWorkerInfo = {...res.result.workerInfo};
|
||||||
this.workerInfo = res.result.workerInfo;
|
this.workerInfo = res.result.workerInfo;
|
||||||
this.productRecord(res.result.workerInfo)
|
this.productRecord(res.result.workerInfo)
|
||||||
//获取证书附件
|
//获取证书附件
|
||||||
@ -525,6 +542,11 @@
|
|||||||
this.showReduceScoreList = !this.showReduceScoreList;
|
this.showReduceScoreList = !this.showReduceScoreList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "./addAttendanceManage?item="+ encodeURIComponent(JSON.stringify(this.originWorkerInfo))
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -543,7 +565,7 @@
|
|||||||
|
|
||||||
//查看信息详情
|
//查看信息详情
|
||||||
showItemDetails(type) {
|
showItemDetails(type) {
|
||||||
// type == 1.合同; 2.体检; 3.保险; 4安全教育; 5.二维码
|
// type == 1.合同; 2.体检; 3.保险; 4安全教育; 5.二维码 ; 6.补卡
|
||||||
let moduleInfo = null;
|
let moduleInfo = null;
|
||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
moduleInfo = this.contractList;
|
moduleInfo = this.contractList;
|
||||||
@ -553,6 +575,13 @@
|
|||||||
moduleInfo = this.insuranceList;
|
moduleInfo = this.insuranceList;
|
||||||
} else if (type == 4) {
|
} else if (type == 4) {
|
||||||
moduleInfo = this.safeEducationList;
|
moduleInfo = this.safeEducationList;
|
||||||
|
} else if (type == 5) {
|
||||||
|
// moduleInfo = this.safeEducationList;
|
||||||
|
} else if (type == 6) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "./addAttendance?item="+ encodeURIComponent(JSON.stringify(this.originWorkerInfo))
|
||||||
|
});
|
||||||
|
return;
|
||||||
};
|
};
|
||||||
uni.setStorageSync('moduleInfo', moduleInfo)
|
uni.setStorageSync('moduleInfo', moduleInfo)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user