3731 lines
123 KiB
Vue
3731 lines
123 KiB
Vue
<template>
|
||
<view class="hzIndex">
|
||
<hzHeader title="门禁卡办理"></hzHeader>
|
||
<view class="hzContent">
|
||
<view class="main">
|
||
<view class="tab-box">
|
||
<view class="tab-item" :class="currentTabIndex == 0 ? 'active' : ''" @click="currentTabIndex = 0">
|
||
门禁卡办理
|
||
<view class="activeLine" v-if="currentTabIndex == 0"></view>
|
||
</view>
|
||
<view class="tab-item" :class="currentTabIndex == 1 ? 'active' : ''" @click="currentTabIndex = 1">
|
||
门禁卡办理记录
|
||
<view class="activeLine" v-if="currentTabIndex == 1"></view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="content" v-if="currentTabIndex == 0" style="position: relative;">
|
||
<view class="interviewee">
|
||
<view class="radio radioBox">
|
||
<view class="r-div">
|
||
<text class="input_left">办卡选择</text>
|
||
</view>
|
||
<view class="radiolist" style="flex-wrap: nowrap;justify-content: center;">
|
||
<view style="width: 22%;border: 0upx;height: 160upx;" @click="showradio(index)" v-for="(item, index) in firstCardItems" :key="index">
|
||
<view style="width: 75%;border-radius: 30upx;background-color: #F4F7FF;margin-bottom: 12upx;" :class="[firstIndex == index ? 'chosenCard' : '']">
|
||
<image :src="item.src" style="width: 60%;height: 60%;"/>
|
||
</view>
|
||
<p class="item_title" style="">{{ item.name }}</p>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="form-box" style="border-radius: 10upx;">
|
||
<view class="form-item" v-if="firstIndex == 0 || firstIndex == 1">
|
||
<text class="label">证件类型:</text>
|
||
<view class="ipt-box select">
|
||
<image class="arrow" src="/static/icons/right-arrow.png" mode=""></image>
|
||
<picker class="picker" v-if="secondCardItems.length > 0" :range="secondCardItems"
|
||
@change="changesecondCardItems" range-key="DESCRIPTION">
|
||
<view>{{ secondCardItems[secondIndex].DESCRIPTION }}</view>
|
||
</picker>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 新办卡 -->
|
||
<view v-if="firstIndex==0">
|
||
<!-- 职工卡 -->
|
||
<view v-if="secondIndex==0">
|
||
<view class="form-item">
|
||
<view style="display: flex;justify-content: flex-start;align-items: center;justify-content: space-between;">
|
||
<text class="label">出入区域<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box">
|
||
<view class="areaBtn" @click="goSelectArea(1)">选择</view>
|
||
</view>
|
||
</view>
|
||
<!-- 区域表格 -->
|
||
<uni-table ref="table" border emptyText="暂无更多数据" style="margin-top: 20upx;">
|
||
<uni-tr>
|
||
<!-- <uni-th width="150" align="left"></uni-th> -->
|
||
</uni-tr>
|
||
<uni-tr v-for="(item, index) in areaData0" :key="index">
|
||
<uni-td align="center" width="80">{{ item.address }}</uni-td>
|
||
<uni-td align="center">{{ item.area }}</uni-td>
|
||
</uni-tr>
|
||
</uni-table>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label" style="width: 250upx;">是否开通人脸权限:</text>
|
||
<view class="ipt-box">
|
||
<radio-group @change="faceChange">
|
||
<label v-for="(item, index) in faceList" :key="index">
|
||
<view style="display: inline-block;margin-right: 20upx;">
|
||
<radio :value="item.value" :checked="item.value ==isEnableFace" color="#00c277"/>
|
||
{{item.name}}
|
||
</view>
|
||
</label>
|
||
</radio-group>
|
||
</view>
|
||
</view>
|
||
<view>
|
||
<view v-for="(people,peopleIndex) in peopleList0" :key="peopleIndex" >
|
||
<view style="margin: 20rpx 10rpx;font-size: 30rpx;font-weight: bold;border-left:4px solid #0DB0A7;">人员信息{{peopleIndex+1}}</view>
|
||
<view class="form-item">
|
||
<text class="label">人员姓名<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><input class="top-t" v-model="people.personnel" placeholder="请输入人员姓名" type="text"
|
||
maxlength="15" /></view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">人员部门<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><input class="top-t" v-model="people.unit" placeholder="请输入人员部门"
|
||
maxlength="15" /></view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">联系电话<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><input class="top-t" v-model="people.personnelPhone" placeholder="请输入联系电话"
|
||
type="text" maxlength="11" /></view>
|
||
</view>
|
||
<view style="margin: 20upx;"><text style="font-size: 28upx;font-weight: bold;">人脸照片(上传1张)<text style="color: red;">*</text>:</text></view>
|
||
<view class="pic" style="border-bottom: 1px solid #eee;">
|
||
<view class="img-box">
|
||
<view class="img-item" v-for="(item, index) in people.faceImgs" :key="index">
|
||
<image class="remove-btn" @click="removeFaceImg(peopleIndex,index)" src="/static/icons/delete-icon.png"
|
||
mode=""></image>
|
||
<image class="img" :src="item.replace(/[\r\n]/g,'')" mode=""></image>
|
||
</view>
|
||
<view class="img-item upload-btn" @click="chooseFaceImg(peopleIndex)" v-if="people.faceImgs.length < 1">
|
||
<image class="img" src="/static/imgs/tianjia-img.png" mode=""></image>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view style="font-size: 28rpx;font-weight: 600;color: red;border-bottom: 1px solid #eee;">互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责!</view>
|
||
<view style="margin: 20upx;"><text style="font-size: 28upx;font-weight: bold;">身份证正反面(上传2张)<text style="color: red;">*</text></text></view>
|
||
<view class="pic" style="border-bottom: 1px solid #eee;">
|
||
<view class="img-box">
|
||
<view class="img-item" v-for="(item, index) in people.idPhotoes" :key="index">
|
||
<image class="remove-btn" @click="removeIdCardImg(peopleIndex,index)" src="/static/icons/delete-icon.png"
|
||
mode=""></image>
|
||
<image class="img" :src="item.replace(/[\r\n]/g,'')" mode=""></image>
|
||
</view>
|
||
<view class="img-item upload-btn" @click="chooseIdCardImg(peopleIndex)" v-if="people.idPhotoes.length < 2">
|
||
<image class="img" src="/static/imgs/tianjia-img.png" mode=""></image>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view style="font-size: 28rpx;font-weight: 600;color: red;border-bottom: 1px solid #eee;">互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责!</view>
|
||
|
||
<view @click="addpeople0()" style="color: #02A7F0;width: 100%;text-align: center;margin: 20rpx 0;">
|
||
增加人员
|
||
</view>
|
||
<view v-if="peopleList0.length>1" @click="delpeople0(peopleIndex)" style="color: #02A7F0;width: 100%;text-align: center;margin: 20rpx 0;">
|
||
删除人员
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="form-box" style="border-radius: 10upx;margin-top: 20upx;">
|
||
<view class="form-item">
|
||
<text class="label">审批人:</text>
|
||
<view class="ipt-box select">
|
||
<image class="arrow" src="/static/icons/right-arrow.png" mode=""></image>
|
||
<picker class="picker" v-if="examList.length > 0" :range="examList" @change="changeExamList"
|
||
range-key="userName">
|
||
<view>{{ examList[examIndex].userName }}</view>
|
||
</picker>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!-- 第三方人员 -->
|
||
<view v-if="secondIndex==1">
|
||
<view class="form-item">
|
||
<text class="label">项目归口管理部门<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box select">
|
||
<image class="arrow" src="/static/icons/right-arrow.png" mode=""></image>
|
||
<picker class="picker" :range="unitList"
|
||
@change="changeUnit" range-key="name">
|
||
<view>{{ unitList[unitIndex].name }}</view>
|
||
</picker>
|
||
</view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">经办人<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box select">
|
||
<image class="arrow" src="/static/icons/right-arrow.png" mode=""></image>
|
||
<picker class="picker" v-if="unitUserList.length > 0" :range="unitUserList" @change="changeUserUnit"
|
||
range-key="name">
|
||
<view>{{ unitUserList[unitUserIndex].name }}</view>
|
||
</picker>
|
||
</view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">联系电话<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><input class="top-t" v-model="handlerPhone" placeholder="请输入" type="text"
|
||
maxlength="15" /></view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label" style="width: 170rpx;">申请人姓名<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box" style="margin-left: 170rpx;"><input class="top-t" v-model="personnelName" placeholder="请输入" type="text"
|
||
maxlength="15" /></view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">所属单位<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><input class="top-t" v-model="unitName" placeholder="请输入" type="text"
|
||
maxlength="15" /></view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">联系方式<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><input class="top-t" v-model="personnelPhone" placeholder="请输入" type="text"
|
||
maxlength="15" /></view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">申请类别<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box select">
|
||
<image class="arrow" src="/static/icons/right-arrow.png" mode=""></image>
|
||
<picker class="picker" :range="typeList"
|
||
@change="changeApplyType" range-key="name">
|
||
<view>{{ typeList[typeIndex].name }}</view>
|
||
</picker>
|
||
</view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">申请期限<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box select">
|
||
<image class="arrow" src="/static/icons/right-arrow.png" mode=""></image>
|
||
<picker class="picker" :range="limitList"
|
||
@change="changeLimitType" range-key="value">
|
||
<view>{{ limitList[limitIndex].name }}</view>
|
||
</picker>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="form-item">
|
||
<view style="display: flex;justify-content: flex-start;align-items: center;justify-content: space-between;">
|
||
<text class="label">申请区域<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box">
|
||
<view class="areaBtn" @click="goSelectArea(2)">选择</view>
|
||
</view>
|
||
</view>
|
||
<!-- 区域表格 -->
|
||
<uni-table ref="table" border emptyText="暂无更多数据" style="margin-top: 20upx;">
|
||
<uni-tr>
|
||
<!-- <uni-th width="150" align="left"></uni-th> -->
|
||
</uni-tr>
|
||
<uni-tr v-for="(item, index) in areaData1" :key="index">
|
||
<uni-td align="center" width="80">{{ item.address }}</uni-td>
|
||
<uni-td align="center">{{ item.area }}</uni-td>
|
||
</uni-tr>
|
||
</uni-table>
|
||
</view>
|
||
<view style="margin: 20upx;border-bottom: 1px solid #eee;"><text style="font-size: 28upx;font-weight: bold;">人脸照片(上传1张)<text style="color: red;">*</text></text></view>
|
||
<view class="pic" style="border-bottom: 1px solid #eee;">
|
||
<view class="img-box">
|
||
<view class="img-item" v-for="(item, index) in faceImgs" :key="index">
|
||
<image class="remove-btn" @click="removeFaceImg2(index)" src="/static/icons/delete-icon.png"
|
||
mode=""></image>
|
||
<image class="img" :src="item.replace(/[\r\n]/g,'')" mode=""></image>
|
||
</view>
|
||
<view class="img-item upload-btn" @click="chooseFaceImg2()" v-if="faceImgs.length < 1">
|
||
<image class="img" src="/static/imgs/tianjia-img.png" mode=""></image>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view style="font-size: 28rpx;font-weight: 600;color: red;border-bottom: 1px solid #eee;">互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责!</view>
|
||
|
||
<view style="margin: 20upx;border-bottom: 1px solid #eee;"><text style="font-size: 28upx;font-weight: bold;">身份证正反面(上传2张)<text style="color: red;">*</text></text></view>
|
||
<view class="pic" style="border-bottom: 1px solid #eee;">
|
||
<view class="img-box">
|
||
<view class="img-item" v-for="(item, index) in idPhotoes" :key="index">
|
||
<image class="remove-btn" @click="removeIdCardImg2(index)" src="/static/icons/delete-icon.png"
|
||
mode=""></image>
|
||
<image class="img" :src="item.replace(/[\r\n]/g,'')" mode=""></image>
|
||
</view>
|
||
<view class="img-item upload-btn" @click="chooseIdCardImg2()" v-if="idPhotoes.length < 2">
|
||
<image class="img" src="/static/imgs/tianjia-img.png" mode=""></image>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view style="font-size: 28rpx;font-weight: 600;color: red;border-bottom: 1px solid #eee;">互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责!</view>
|
||
|
||
<view style="margin: 20upx;border-bottom: 1px solid #eee;"><text style="font-size: 28upx;font-weight: bold;">情况说明(上传图片)</text></view>
|
||
<view class="pic" style="border-bottom: 1px solid #eee;">
|
||
<view class="img-box">
|
||
<view class="img-item" v-for="(item, index) in situationPhotoes" :key="index">
|
||
<image class="remove-btn" @click="removeSituationImg(index)" src="/static/icons/delete-icon.png"
|
||
mode=""></image>
|
||
<image class="img" :src="item.replace(/[\r\n]/g,'')" mode=""></image>
|
||
</view>
|
||
<view class="img-item upload-btn" @click="chooseSituationImg()" v-if="situationPhotoes.length < 1">
|
||
<image class="img" src="/static/imgs/tianjia-img.png" mode=""></image>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view style="font-size: 28rpx;font-weight: 600;color: red;border-bottom: 1px solid #eee;">互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责!</view>
|
||
|
||
<view class="form-box" style="border-radius: 10upx;margin-top: 20upx;">
|
||
<view class="form-item">
|
||
<text class="label">项目归口部门负责人<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box select">
|
||
<image class="arrow" src="/static/icons/right-arrow.png" mode=""></image>
|
||
<picker class="picker" v-if="examList1.length > 0" :range="examList1" @change="changeExamList1"
|
||
range-key="userName">
|
||
<view>{{ examList1[examIndex1].userName }}</view>
|
||
</picker>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!-- VIP贵宾 -->
|
||
<view v-if="secondIndex==2">
|
||
<view class="form-item">
|
||
<text class="label">经办部门<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box select">
|
||
<image class="arrow" src="/static/icons/right-arrow.png" mode=""></image>
|
||
<picker class="picker" :range="unitList2"
|
||
@change="changeUnit2" range-key="name">
|
||
<view>{{ unitList2[unitIndex2].name }}</view>
|
||
</picker>
|
||
</view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">经办人员<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box select">
|
||
<image class="arrow" src="/static/icons/right-arrow.png" mode=""></image>
|
||
<picker class="picker" v-if="unitUserList2.length > 0" :range="unitUserList2" @change="changeUserUnit2"
|
||
range-key="name">
|
||
<view>{{ unitUserList2[unitUserIndex].name }}</view>
|
||
</picker>
|
||
</view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">联系电话<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><input class="top-t" v-model="handlerPhone2" placeholder="请输入" type="text"
|
||
maxlength="15" /></view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">借出时间<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><uni-datetime-picker :clear-icon="false" v-model="outDate"
|
||
type="date" :border="false"/></view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">归还时间<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><uni-datetime-picker :clear-icon="false" v-model="backDate"
|
||
type="date" :border="false"/></view>
|
||
</view>
|
||
<view style="margin: 20upx;border-bottom: 1px solid #eee;"><text style="font-size: 28upx;font-weight: bold;">附件:</text></view>
|
||
<view class="pic" style="border-bottom: 1px solid #eee;">
|
||
<view class="img-box">
|
||
<view class="img-item" v-for="(item, index) in documentPhoto" :key="index">
|
||
<image class="remove-btn" @click="removeDocumentImg(index)" src="/static/icons/delete-icon.png"
|
||
mode=""></image>
|
||
<image class="img" :src="item.replace(/[\r\n]/g,'')" mode=""></image>
|
||
</view>
|
||
<view class="img-item upload-btn" @click="chooseDocumentImg()" v-if="documentPhoto.length < 1">
|
||
<image class="img" src="/static/imgs/tianjia-img.png" mode=""></image>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view style="font-size: 28rpx;font-weight: 600;color: red;border-bottom: 1px solid #eee;">互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责!</view>
|
||
|
||
<view class="form-box" style="border-radius: 10upx;margin-top: 20upx;">
|
||
<view class="form-item">
|
||
<text class="label">经办部门负责人<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box select">
|
||
<image class="arrow" src="/static/icons/right-arrow.png" mode=""></image>
|
||
<picker class="picker" v-if="examList2.length > 0" :range="examList2" @change="changeExamList2"
|
||
range-key="userName">
|
||
<view>{{ examList2[examIndex2].userName }}</view>
|
||
</picker>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
</view>
|
||
</view>
|
||
<!-- /新办卡 -->
|
||
|
||
<!-- /新办证 -->
|
||
<view v-if="firstIndex==1">
|
||
<!-- 临时出入证 -->
|
||
<view v-if="secondIndex==0">
|
||
<view class="form-item">
|
||
<text class="label">项目名称<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><input class="top-t" v-model="proName" placeholder="请输入项目名称"
|
||
maxlength="15" /></view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">项目单位<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><input class="top-t" v-model="proUnitName" placeholder="请输入项目单位"
|
||
maxlength="15" /></view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label" style="width: 170rpx;">项目负责人<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box" style="margin-left: 170rpx;"><input class="top-t" v-model="proUserName" placeholder="请输入项目负责人"
|
||
maxlength="15" /></view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">联系电话<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><input class="top-t" v-model="proUserPhone" placeholder="请输入手机号码"
|
||
type="text" maxlength="11" /></view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">项目归口管理部门<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box select">
|
||
<image class="arrow" src="/static/icons/right-arrow.png" mode=""></image>
|
||
<picker class="picker" :range="unitList3"
|
||
@change="changeUnit3" range-key="name">
|
||
<view>{{ unitList3[unitIndex3].name }}</view>
|
||
</picker>
|
||
</view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">经办人员<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box select">
|
||
<image class="arrow" src="/static/icons/right-arrow.png" mode=""></image>
|
||
<picker class="picker" v-if="unitUserList3.length > 0" :range="unitUserList3" @change="changeUserUnit3"
|
||
range-key="name">
|
||
<view>{{ unitUserList3[unitUserIndex3].name }}</view>
|
||
</picker>
|
||
</view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label" style="width: 170rpx;">合同有效期<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><uni-datetime-picker :clear-icon="false" v-model="dateRange"
|
||
type="daterange" :border="false"/></view>
|
||
</view>
|
||
<view class="form-item" style="display:none">
|
||
<text class="label" style="width: 170rpx;">证件有效期<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><uni-datetime-picker :clear-icon="false" v-model="dateRange1"
|
||
type="daterange" :border="false"/></view>
|
||
</view>
|
||
|
||
<view class="form-item">
|
||
<view style="display: flex;justify-content: flex-start;align-items: center;justify-content: space-between;">
|
||
<text class="label" style="width: 190rpx;">申请出入区域<text style="color: red;">*</text>:</text>
|
||
</view>
|
||
<checkbox-group @change="accessAreaChecked" style="padding-left: 10upx;display: flex;flex-wrap: wrap;">
|
||
<view style="display: flex;justify-content: flex-start;align-items: center;margin-left: 10upx;margin-top: 10px;">
|
||
<view>
|
||
<checkbox color="#4db4ea" value="科技楼"/>
|
||
</view>
|
||
<view style="margin-right: 10upx;width: 70px;">科技楼</view>
|
||
</view>
|
||
<view
|
||
style="display: flex;justify-content: flex-start;align-items: center;margin-left: 10upx;margin-top: 10px;">
|
||
<view>
|
||
<checkbox color="#4db4ea" value="调度楼" />
|
||
</view>
|
||
<view style="margin-right: 10upx;width: 70px;">调度楼</view>
|
||
</view>
|
||
<view
|
||
style="display: flex;justify-content: flex-start;align-items: center;margin-left: 10upx;margin-top: 10px;">
|
||
<view>
|
||
<checkbox color="#4db4ea" value="后勤楼" />
|
||
</view>
|
||
<view style="margin-right: 10upx;width: 70px;">后勤楼</view>
|
||
</view>
|
||
<view
|
||
style="display: flex;justify-content: flex-start;align-items: center;margin-left: 10upx;margin-top: 10px;">
|
||
<view>
|
||
<checkbox color="#4db4ea" value="同城调度" />
|
||
</view>
|
||
<view style="margin-right: 10upx;width: 70px;">同城调度</view>
|
||
</view>
|
||
<view
|
||
style="display: flex;justify-content: flex-start;align-items: center;margin-left: 10upx;margin-top: 10px;">
|
||
<view>
|
||
<checkbox color="#4db4ea" value="青年公寓" />
|
||
</view>
|
||
<view style="margin-right: 10upx;width: 70px;">青年公寓</view>
|
||
</view>
|
||
</checkbox-group>
|
||
</view>
|
||
<view style="margin: 20upx;border-bottom: 1px solid #eee;"><text style="font-size: 28upx;font-weight: bold;">附件:</text></view>
|
||
<view class="pic" style="border-bottom: 1px solid #eee;">
|
||
<view class="img-box">
|
||
<view class="img-item" v-for="(item, index) in documentPhoto" :key="index">
|
||
<image class="remove-btn" @click="removeDocumentImg(index)" src="/static/icons/delete-icon.png"
|
||
mode=""></image>
|
||
<image class="img" :src="item.replace(/[\r\n]/g,'')" mode=""></image>
|
||
</view>
|
||
<view class="img-item upload-btn" @click="chooseDocumentImg()" v-if="documentPhoto.length < 1">
|
||
<image class="img" src="/static/imgs/tianjia-img.png" mode=""></image>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view style="font-size: 28rpx;font-weight: 600;color: red;border-bottom: 1px solid #eee;">互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责!</view>
|
||
<view class="form-item">
|
||
<text class="label">办证人数<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box" style="margin-top: 10rpx;">{{peopleList1.length}}</view>
|
||
</view>
|
||
<view v-for="(people,peopleIndex) in peopleList1" :key="peopleIndex" >
|
||
<view style="margin: 20rpx 10rpx;font-size: 30rpx;font-weight: bold;border-left:4px solid #0DB0A7;">办证人员信息{{peopleIndex+1}}</view>
|
||
<view class="form-item">
|
||
<text class="label">人员姓名<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><input class="top-t" v-model="people.personnelName" placeholder="请输入人员姓名" type="text"
|
||
maxlength="15" /></view>
|
||
</view>
|
||
<view style="margin: 20upx;"><text style="font-size: 28upx;font-weight: bold;">人脸照片(上传1张)<text style="color: red;">*</text>:</text></view>
|
||
<view class="pic" style="border-bottom: 1px solid #eee;">
|
||
<view class="img-box">
|
||
<view class="img-item" v-for="(item, index) in people.faceImgs" :key="index">
|
||
<image class="remove-btn" @click="removeFaceImg3(peopleIndex,index)" src="/static/icons/delete-icon.png"
|
||
mode=""></image>
|
||
<image class="img" :src="item.replace(/[\r\n]/g,'')" mode=""></image>
|
||
</view>
|
||
<view class="img-item upload-btn" @click="chooseFaceImg3(peopleIndex)" v-if="people.faceImgs.length < 1">
|
||
<image class="img" src="/static/imgs/tianjia-img.png" mode=""></image>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view style="font-size: 28rpx;font-weight: 600;color: red;border-bottom: 1px solid #eee;">互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责!</view>
|
||
<view @click="addpeople1()" style="color: #02A7F0;width: 100%;text-align: center;margin: 20rpx 0;">
|
||
增加办证人员
|
||
</view>
|
||
<view v-if="peopleList1.length>1" @click="delpeople1(peopleIndex)" style="color: #02A7F0;width: 100%;text-align: center;margin: 20rpx 0;">
|
||
删除办证人员
|
||
</view>
|
||
</view>
|
||
<view class="form-box" style="border-radius: 10upx;margin-top: 20upx;">
|
||
<view class="form-item">
|
||
<text class="label">项目归口部门负责人<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box select">
|
||
<image class="arrow" src="/static/icons/right-arrow.png" mode=""></image>
|
||
<picker class="picker" v-if="examList3.length > 0" :range="examList3" @change="changeExamList3"
|
||
range-key="userName">
|
||
<view>{{ examList3[examIndex3].userName }}</view>
|
||
</picker>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!-- 施工出入证 -->
|
||
<view v-if="secondIndex==1">
|
||
<view class="form-item">
|
||
<text class="label">项目归口管理部门<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box select">
|
||
<image class="arrow" src="/static/icons/right-arrow.png" mode=""></image>
|
||
<picker class="picker" :range="unitList4"
|
||
@change="changeUnit4" range-key="name">
|
||
<view>{{ unitList4[unitIndex4].name }}</view>
|
||
</picker>
|
||
</view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">经办人员<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box select">
|
||
<image class="arrow" src="/static/icons/right-arrow.png" mode=""></image>
|
||
<picker class="picker" v-if="unitUserList4.length > 0" :range="unitUserList4" @change="changeUserUnit4"
|
||
range-key="name">
|
||
<view>{{ unitUserList4[unitUserIndex4].name }}</view>
|
||
</picker>
|
||
</view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">联系电话<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><input class="top-t" v-model="handlerPhone4" placeholder="请输入手机号码"
|
||
type="text" maxlength="11" /></view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">工作内容<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><input class="top-t" v-model="work" placeholder="请输入" type="text"
|
||
maxlength="15" /></view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label" style="width: 170rpx;">工作票编号:</text>
|
||
<view class="ipt-box" style="margin-left: 170rpx;"><input class="top-t" v-model="ticketNo" placeholder="请输入" type="text"
|
||
maxlength="20" /></view>
|
||
</view>
|
||
<view class="form-item">
|
||
<view style="display: flex;justify-content: flex-start;align-items: center;justify-content: space-between;">
|
||
<text class="label" style="width: 190rpx;">作业地点<text style="color: red;">*</text>:</text>
|
||
</view>
|
||
<checkbox-group @change="accessAreaChecked1" style="padding-left: 10upx;display: flex;">
|
||
<view style="display: flex;justify-content: flex-start;align-items: center;margin-left: 10upx;margin-top: 10px;">
|
||
<view>
|
||
<checkbox color="#4db4ea" value="科技楼"/>
|
||
</view>
|
||
<view style="margin-right: 10upx;width: 70px;">科技楼</view>
|
||
</view>
|
||
<view
|
||
style="display: flex;justify-content: flex-start;align-items: center;margin-left: 10upx;margin-top: 10px;">
|
||
<view>
|
||
<checkbox color="#4db4ea" value="调度楼" />
|
||
</view>
|
||
<view style="margin-right: 10upx;width: 70px;">调度楼</view>
|
||
</view>
|
||
<view
|
||
style="display: flex;justify-content: flex-start;align-items: center;margin-left: 10upx;margin-top: 10px;">
|
||
<view>
|
||
<checkbox color="#4db4ea" value="后勤楼" />
|
||
</view>
|
||
<view style="margin-right: 10upx;width: 70px;">后勤楼</view>
|
||
</view>
|
||
</checkbox-group>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">作业单位<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><input class="top-t" v-model="workUnit" placeholder="请输入" type="text"
|
||
maxlength="20" /></view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label" style="width: 170rpx;">工作负责人<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box" style="margin-left: 170rpx;"><input class="top-t" v-model="workCharger" placeholder="请输入" type="text"
|
||
maxlength="20" /></view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">联系方式<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><input class="top-t" v-model="workChargerPhone" placeholder="请输入" type="text"
|
||
maxlength="11" /></view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label" style="width: 170rpx;">合同有效期<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><uni-datetime-picker :clear-icon="false" v-model="dateRange2"
|
||
type="daterange" :border="false"/></view>
|
||
</view>
|
||
|
||
<view class="form-item">
|
||
<text class="label">车牌号:</text>
|
||
<view class="ipt-box"><input class="top-t" v-model="licenseNumber" placeholder="请输入" type="text"
|
||
maxlength="9" /></view>
|
||
</view>
|
||
<view v-for="(people,peopleIndex) in peopleList2" :key="peopleIndex" >
|
||
<view style="margin: 20rpx 10rpx;font-size: 30rpx;font-weight: bold;border-left:4px solid #0DB0A7;">作业班成员{{peopleIndex+1}}</view>
|
||
<view class="form-item">
|
||
<text class="label">人员姓名<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><input class="top-t" v-model="people.personnelName" placeholder="请输入人员姓名" type="text"
|
||
maxlength="15" /></view>
|
||
</view>
|
||
<view class="form-item">
|
||
<text class="label">身份证号<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box"><input class="top-t" v-model="people.idNumber" placeholder="请输入身份证号" type="text"
|
||
maxlength="19" /></view>
|
||
</view>
|
||
<view style="margin: 20upx;"><text style="font-size: 28upx;font-weight: bold;">人脸照片(上传1张)<text style="color: red;">*</text>:</text></view>
|
||
<view class="pic" style="border-bottom: 1px solid #eee;">
|
||
<view class="img-box">
|
||
<view class="img-item" v-for="(item, index) in people.faceImgs" :key="index">
|
||
<image class="remove-btn" @click="removeFaceImg4(peopleIndex,index)" src="/static/icons/delete-icon.png"
|
||
mode=""></image>
|
||
<image class="img" :src="item.replace(/[\r\n]/g,'')" mode=""></image>
|
||
</view>
|
||
<view class="img-item upload-btn" @click="chooseFaceImg4(peopleIndex)" v-if="people.faceImgs.length < 1">
|
||
<image class="img" src="/static/imgs/tianjia-img.png" mode=""></image>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view style="font-size: 28rpx;font-weight: 600;color: red;border-bottom: 1px solid #eee;">互联网信息系统严禁存储、传输、处理涉及国家秘密企业秘密以及敏感信息,违者将严肃问责追责!</view>
|
||
<view @click="addpeople2()" style="color: #02A7F0;width: 100%;text-align: center;margin: 20rpx 0;">
|
||
增加办证人员
|
||
</view>
|
||
<view v-if="peopleList2.length>1" @click="delpeople2(peopleIndex)" style="color: #02A7F0;width: 100%;text-align: center;margin: 20rpx 0;">
|
||
删除办证人员
|
||
</view>
|
||
</view>
|
||
<view class="form-box" style="border-radius: 10upx;margin-top: 20upx;">
|
||
<view class="form-item">
|
||
<text class="label">项目归口部门负责人<text style="color: red;">*</text>:</text>
|
||
<view class="ipt-box select">
|
||
<image class="arrow" src="/static/icons/right-arrow.png" mode=""></image>
|
||
<picker class="picker" v-if="examList4.length > 0" :range="examList4" @change="changeExamList4"
|
||
range-key="userName">
|
||
<view>{{ examList4[examIndex4].userName }}</view>
|
||
</picker>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!-- /新办证 -->
|
||
|
||
</view>
|
||
|
||
<!-- 挂失 -->
|
||
<view class="card-box" style="border-radius: 10upx;margin-top: 20upx;" v-if="firstIndex==2">
|
||
<view style="margin-bottom: 20upx;display: flex;width: 100%;justify-content: space-between;align-items: center;">
|
||
<view>我的卡</view>
|
||
<view style="padding: 20rpx;border: 1px solid #6CD374;border-radius: 20rpx;" @click="openCardBand">绑定卡</view>
|
||
</view>
|
||
|
||
<view v-for="(item, index) in myCardList" :key="index">
|
||
<view class="card-item" :style="{background:item.isLoss=='0'?'#6CD374':'#989898'}">
|
||
<view style="margin-bottom:20upx;">{{item.cardName}}</view>
|
||
<view style="margin-bottom:20upx;">{{item.name}}</view>
|
||
<view style="margin-bottom:20upx;">{{item.staffNo}}</view>
|
||
<view style="width: 100%;height: auto;display: flex;align-items: center;justify-content: flex-end;">
|
||
<view class="card-btn" v-if="item.isLoss=='0'" @click="unbindCard(item)">解绑</view>
|
||
<view class="card-btn" v-if="item.isLoss=='0'" @click="circulation(item)">挂失</view>
|
||
<view class="card-btn" v-if="item.isLoss=='1'" style="background: #989898;">挂失中</view>
|
||
<view class="card-btn" v-if="item.isLoss=='2'" style="background: #989898;">已挂失</view>
|
||
<view class="card-btn" v-if="item.isLoss=='3'" style="background: #989898;">已补办</view>
|
||
<view class="card-btn" v-if="item.isLoss=='3'"style="background: #FFEFE3;color: #FF9000;" @click="delCardOpen(item)">删除</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
</view>
|
||
|
||
<!-- 补办 -->
|
||
<view class="card-box" style="border-radius: 10upx;margin-top: 20upx;" v-if="firstIndex==3">
|
||
<view style="margin-bottom: 20upx;display: flex;width: 100%;justify-content: space-between;align-items: center;">
|
||
<view>待补办</view>
|
||
</view>
|
||
|
||
<view v-for="(item, index) in reissueCardList" :key="index">
|
||
<view class="card-item" :style="{background:'#6CD374'}">
|
||
<view style="margin-bottom:20upx;">{{item.cardName}}</view>
|
||
<view style="margin-bottom:20upx;">{{item.name}}</view>
|
||
<view style="margin-bottom:20upx;">{{item.staffNo}}</view>
|
||
<view style="width: 100%;height: auto;display: flex;align-items: center;justify-content: flex-end;">
|
||
<view class="card-btn" @click="reissueCardOpen(item)">补办</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!-- 补办 -->
|
||
|
||
|
||
|
||
|
||
</view>
|
||
<view class="occupied"></view>
|
||
<view class="footer-btn" @click="submit" v-if="firstIndex==0||firstIndex==1">
|
||
<view class="btn">提交</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view v-if="currentTabIndex == 1" style="position: relative;">
|
||
<view class="list-content" v-if="cardList.length > 0">
|
||
<view class="details" v-for="(item, i) in cardList" :key="i">
|
||
<view class="detail_header" @click="details(item)">
|
||
<!-- <text class="blueSign"></text> -->
|
||
<image src="/static/img/cardIcon.png" mode="" style="width: 35upx;height: 40upx;margin-left: 20upx;vertical-align: middle;"></image>
|
||
<text class="font-tilte">{{item.typeName}}申请</text>
|
||
<text v-if="item.examineState ==0" class="statusred" style="color: #ff9000;background-color: #FFEFE3;">
|
||
<text v-if="item.examineState==0">待审核</text>
|
||
<text v-if="item.examineState!=0">审核中</text>
|
||
</text>
|
||
<text v-if="item.examineState ==2" class="statusred" style="color: #BD1515;background-color: #F6DFDF;">已拒绝</text>
|
||
<text v-if="item.examineState ==1" class="statusred" style="color: #0DB0A7;background-color: #C1EFEA;">
|
||
<text v-if="item.cardStatus==1">待制作</text>
|
||
<text v-if="item.cardStatus==2">待领取</text>
|
||
<text v-if="item.cardStatus==3">已领取</text>
|
||
</text>
|
||
</view>
|
||
|
||
<view class="detail_msg" @click="details(item)">
|
||
<view class="info-item">
|
||
<text>办卡类型:</text>
|
||
<text class="infoSpan">{{item.typeName}}</text>
|
||
</view>
|
||
<view class="info-item">
|
||
<text>门卡类型:</text>
|
||
<text class="infoSpan">{{item.cardType}}</text>
|
||
</view>
|
||
<view class="info-item">
|
||
<text>申请人:</text>
|
||
<text class="infoSpan">{{userInfo.userName}}</text>
|
||
</view>
|
||
<view class="info-item">
|
||
<text>申请时间:</text>
|
||
<text class="infoSpan">{{ formatDate(item.applyTime,'dateTime')}}</text>
|
||
</view>
|
||
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<content-none v-else :padTop="20"></content-none>
|
||
</view>
|
||
</view>
|
||
<load-more v-if="currentTabIndex == 1" :loadingType="loadingType" :contentText="contentText"></load-more>
|
||
<uni-popup ref="popup" type="center">
|
||
<view style="background: white;width: 80%;height: 240upx;width: 600upx;position: relative;border-radius: 10upx;padding: 14upx;">
|
||
<view style="color: #333;font-size: 30upx;font-weight: bold;padding: 10upx 0px;width: 100%;text-align: center;margin-top: 20upx;">
|
||
<text>请确认是否挂失所选卡?</text>
|
||
</view>
|
||
<view class="footer-btn footer-btn-two" style="position: absolute;margin-bottom: 20upx;">
|
||
<view class="btn btn-col" style="width:30%;margin-left:18%;margin-right: 6%;border-radius: 10upx;height: 65upx;line-height: 65upx;" @click="closeCirculation()">取消</view>
|
||
<view class="btn btn-col1" style="width:30%;border-radius: 10upx;height: 65upx;line-height: 65upx;" @click="handleCard()">确定</view>
|
||
</view>
|
||
</view>
|
||
</uni-popup>
|
||
|
||
<uni-popup ref="popup2" type="center">
|
||
<view style="background: white;width: 80%;height: 240upx;width: 600upx;position: relative;border-radius: 10upx;padding: 14upx;">
|
||
<view style="color: #333;font-size: 30upx;font-weight: bold;padding: 10upx 0px;width: 100%;text-align: center;margin-top: 20upx;">
|
||
<text>请确认是否解绑所选卡?</text>
|
||
</view>
|
||
<view class="footer-btn footer-btn-two" style="position: absolute;margin-bottom: 20upx;">
|
||
<view class="btn btn-col" style="width:30%;margin-left:18%;margin-right: 6%;border-radius: 10upx;height: 65upx;line-height: 65upx;" @click="closeCirculation2()">取消</view>
|
||
<view class="btn btn-col1" style="width:30%;border-radius: 10upx;height: 65upx;line-height: 65upx;" @click="handleCard2()">确定</view>
|
||
</view>
|
||
</view>
|
||
</uni-popup>
|
||
|
||
<uni-popup ref="bandPopup" type="center">
|
||
<view style="background: white;width: 100%;height: 300upx;width: 600upx;position: relative;border-radius: 10upx;padding: 14upx;">
|
||
<view style="color: #333;padding: 10upx 0px;width: 100%;margin-top: 20upx;">
|
||
|
||
<view style="font-weight: bold;">绑定卡号:</view>
|
||
<view style="margin-top: 20rpx;"><input class="top-t" v-model="cardBand.cardNo" placeholder="请输入卡号" type="text" maxlength="20" style="width: 100%;font-size: 30rpx;"/></view>
|
||
</view>
|
||
<view class="footer-btn footer-btn-two" style="position: absolute;margin-bottom: 20upx;">
|
||
<view class="btn btn-col" style="width:30%;margin-left:18%;margin-right: 6%;border-radius: 10upx;height: 65upx;line-height: 65upx;" @click="closecardBand()">取消</view>
|
||
<view class="btn btn-col1" style="width:30%;border-radius: 10upx;height: 65upx;line-height: 65upx;" @click="handleCardBand()">绑定</view>
|
||
</view>
|
||
</view>
|
||
</uni-popup>
|
||
|
||
<uni-popup ref="popup3" type="center">
|
||
<view style="background: white;width: 80%;height: 240upx;width: 600upx;position: relative;border-radius: 10upx;padding: 14upx;">
|
||
<view style="color: #333;font-size: 30upx;font-weight: bold;padding: 10upx 0px;width: 100%;text-align: center;margin-top: 20upx;">
|
||
<text>请确认是否补办所选卡?</text>
|
||
</view>
|
||
<view class="footer-btn footer-btn-two" style="position: absolute;margin-bottom: 20upx;">
|
||
<view class="btn btn-col" style="width:30%;margin-left:18%;margin-right: 6%;border-radius: 10upx;height: 65upx;line-height: 65upx;" @click="closeReissueCard()">取消</view>
|
||
<view class="btn btn-col1" style="width:30%;border-radius: 10upx;height: 65upx;line-height: 65upx;" @click="handleReissueCard()">补办</view>
|
||
</view>
|
||
</view>
|
||
</uni-popup>
|
||
|
||
<uni-popup ref="popup4" type="center">
|
||
<view style="background: white;width: 80%;height: 240upx;width: 600upx;position: relative;border-radius: 10upx;padding: 14upx;">
|
||
<view style="color: #333;font-size: 30upx;font-weight: bold;padding: 10upx 0px;width: 100%;text-align: center;margin-top: 20upx;">
|
||
<text>请确认是否解绑所选卡?</text>
|
||
</view>
|
||
<view class="footer-btn footer-btn-two" style="position: absolute;margin-bottom: 20upx;">
|
||
<view class="btn btn-col" style="width:30%;margin-left:18%;margin-right: 6%;border-radius: 10upx;height: 65upx;line-height: 65upx;" @click="closeDelCard()">取消</view>
|
||
<view class="btn btn-col1" style="width:30%;border-radius: 10upx;height: 65upx;line-height: 65upx;" @click="handleDelCard()">解绑</view>
|
||
</view>
|
||
</view>
|
||
</uni-popup>
|
||
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import {
|
||
addCard,
|
||
addCardData,
|
||
getAuditCheckUser,
|
||
getAuditCheckUser2,
|
||
getDetailInfo,
|
||
getDeptList,
|
||
getUserInfoByDept,
|
||
getDictByType,
|
||
getAuditData,
|
||
getCardList,
|
||
|
||
getIssueCardByUserId,
|
||
getAllDept,
|
||
getCardType,
|
||
getDeptExamineAuth,
|
||
getAllCardList,
|
||
updateCardStatusById,
|
||
reissueCard,
|
||
addMyCard,
|
||
getReissueCardList
|
||
} from '@/common/api.js';
|
||
import {
|
||
callbackRequest,
|
||
getStorage,
|
||
alertTip,
|
||
convertImgToBase64,
|
||
formatDate,
|
||
wxSdk,
|
||
uploadImg
|
||
} from '@/common/util.js';
|
||
import loadMore from '@/components/loadMore.vue';
|
||
import contentNone from '@/components/contentNone.vue';
|
||
|
||
import {
|
||
pathToBase64
|
||
} from '@/js_sdk/mmmm-image-tools/index.js';
|
||
export default {
|
||
components: {
|
||
loadMore,
|
||
contentNone
|
||
},
|
||
data() {
|
||
return {
|
||
formatDate: formatDate,
|
||
//分页
|
||
page: 1,
|
||
pageSize: 10,
|
||
loadingType: 0, //0-loading前;1-loading中;2-没有更多了
|
||
contentText: {
|
||
contentdown: '上拉加载更多',
|
||
contentrefresh: '正在加载...',
|
||
contentnomore: '没有更多数据了'
|
||
},
|
||
|
||
userInfo: getStorage('userInfo'),
|
||
//办卡-职工卡--------------------------------------------
|
||
areaData0:[],//职工卡-出入区域
|
||
isEnableFace: '0',//职工卡-是否开启人脸权限
|
||
faceList: [{
|
||
name: '是',
|
||
value: '1'
|
||
}, {
|
||
name: '否',
|
||
value: '0'
|
||
}],
|
||
peopleList0:[//职工卡-人员列表
|
||
{
|
||
personnel: '',
|
||
unit: '',
|
||
personnelPhone: '',
|
||
faceImgs:[],
|
||
faceImgsId:[],
|
||
idPhotoes:[],
|
||
idPhotoesId: [],
|
||
}
|
||
],
|
||
examIndex: 0,//审批人
|
||
examList: [],//审批人
|
||
//办卡-第三方人员----------------------------------------
|
||
unitIndex:0,//项目归口管理部门
|
||
unitList: [{id:"",name:""}],
|
||
unitUserIndex:0,//经办人
|
||
unitUserList: [],//经办合集
|
||
handlerName: '', //经办人
|
||
handlerPhone: '',//经办人联系电话
|
||
unitName: '',//申请人姓名
|
||
personnelName: '',//所属单位
|
||
personnelPhone: '',//联系方式
|
||
typeIndex:0,//申请类型
|
||
typeList: [{
|
||
name: '信息运维',
|
||
value: '信息运维'
|
||
}, {
|
||
name: '物业服务',
|
||
value: '物业服务'
|
||
}, {
|
||
name: '其他',
|
||
value: '其他'
|
||
}],
|
||
limitIndex:0,//申请时限
|
||
limitList: [{
|
||
name: '一年',
|
||
value: '一年'
|
||
}, {
|
||
name: '固定期限',
|
||
value: '固定期限'
|
||
}, {
|
||
name: '其他',
|
||
value: '其他'
|
||
}],
|
||
areaData1:[],//第三方人员-出入区域
|
||
faceImgs:[],//人脸图片
|
||
faceImgsId:[],//人脸图片
|
||
idPhotoes:[],//身份证正反面
|
||
idPhotoesId: [],//身份证正反面
|
||
situationPhotoes: [],//情况说明
|
||
situationPhotoesId: [],//情况说明
|
||
examIndex1: 0,//项目归口部门负责人
|
||
examList1: [],//项目归口部门负责人
|
||
//办卡-VIP贵宾------------------------------------
|
||
unitIndex2:0,//项目归口管理部门
|
||
unitList2: [{id:"",name:""}],
|
||
unitUserIndex2:0,//经办人
|
||
unitUserList2: [],//经办合集
|
||
handlerName2: '', //经办人
|
||
handlerPhone2: '',//经办人联系电话
|
||
outDate:'',//借出时间
|
||
backDate:'',//归还时间
|
||
realBackDate:'',//实际归还时间
|
||
remarks:'',//备注
|
||
documentPhoto: [],//附件
|
||
documentPhotoId: [],//附件
|
||
examIndex2: 0,//经办部门负责人
|
||
examList2: [],//经办部门负责人
|
||
|
||
//办证数据
|
||
//临时出入证-----------------------------
|
||
proName:"",//项目名称
|
||
proUnitName:"",//项目单位
|
||
proUserName:"",//项目负责人
|
||
proUserPhone:"",//联系方式
|
||
unitIndex3:0,//项目归口管理部门
|
||
unitList3: [{id:"",name:""}],
|
||
handlerName3:"", //经办人
|
||
unitUserIndex3:0,//经办人
|
||
unitUserList3: [],//经办合集
|
||
dateRange: '',//合同有效期
|
||
dateRange1: '',//证件有效期
|
||
accessArea: '',//申请出入区域
|
||
applyNumber:1,//办证人数
|
||
peopleList1:[//办证人员列表
|
||
{
|
||
personnelName: '',
|
||
faceImgs:[],
|
||
faceImgsId:[],
|
||
}
|
||
],
|
||
examIndex3: 0,//项目归口部门负责人
|
||
examList3: [],//项目归口部门负责人
|
||
//施工出入证-----------------------------
|
||
unitIndex4:0,//项目归口管理部门
|
||
unitList4: [{
|
||
name: '后勤部',
|
||
value: '后勤部'
|
||
}, {
|
||
name: '综合部',
|
||
value: '综合部'
|
||
}, {
|
||
name: '办公室',
|
||
value: '办公室'
|
||
}],
|
||
unitUserIndex4:0,//经办人
|
||
unitUserList4: [],//经办合集
|
||
handlerName4:"", //经办人
|
||
handlerPhone4: '',//经办人联系电话
|
||
work: '',//工作内容
|
||
ticketNo:'',//工作票编号
|
||
accessArea1:'',//作业地点
|
||
workUnit:'',//作业单位
|
||
workCharger:'',//工作负责人
|
||
workChargerPhone:'',//工作负责人联系方式
|
||
dateRange2: '',//合同有效期
|
||
dateRange3: '',//证件有效期
|
||
licenseNumber: '',//车牌号
|
||
peopleList2:[//作业班成员列表
|
||
{
|
||
personnelName: '',
|
||
idNumber: '',
|
||
faceImgs:[],
|
||
faceImgsId:[],
|
||
}
|
||
],
|
||
examIndex4: 0,//项目归口部门负责人
|
||
examList4: [],//项目归口部门负责人
|
||
// ---------------------------------------------
|
||
chosenType:0,
|
||
myCardList:[],//我的卡列表
|
||
reissueCardList:[],//待补办卡列表
|
||
losscard:{},
|
||
unbind:{},
|
||
reissueCardData:{},
|
||
delCardData:{},
|
||
//补卡数组
|
||
lossCardList:[],
|
||
// 补卡类型
|
||
lossIndex:0,
|
||
lossItem:{
|
||
orgName:'',name:'',phone:'',staffNo:'',
|
||
},
|
||
showIndex: 0,
|
||
currentTabIndex: 0,
|
||
cardList: [],
|
||
index: 0,
|
||
firstCardItems: [{
|
||
id: '1',
|
||
name: '新办卡',
|
||
src:'/static/img/card1.png'
|
||
}, {
|
||
id: '2',
|
||
name: '新办证',
|
||
src:'/static/img/card2.png'
|
||
}, {
|
||
id: '4',
|
||
name: '卡挂失',
|
||
src:'/static/img/card4.png'
|
||
},{
|
||
id: '3',
|
||
name: '补办卡',
|
||
src:'/static/img/card3.png'
|
||
}],
|
||
firstIndex: 0,
|
||
secondCardItems: [], //{ id: '1', name: '职工卡' }, { id: '2', name: '聘用人员卡' }, { id: '3', name: '支撑人员卡' },{ id: '4', name: '出入证' }
|
||
secondIndex: 0,
|
||
faultType: 0,
|
||
// pageTitle: ['新办卡', '补办卡', '新办证', '补办证'],
|
||
submitFlag: true,
|
||
showAlert: false,
|
||
scienceTechRemarks: '', //科技楼备注
|
||
dispatchRemarks: '', //调度楼备注
|
||
logisticsRemarks: '', //后勤楼备注
|
||
cardBand:{
|
||
cardNo:""
|
||
}
|
||
};
|
||
},
|
||
watch: {
|
||
currentTabIndex: function(newVal, oldVal) {
|
||
if (newVal == 1) {
|
||
this.page = 1;
|
||
this.loadingType = 0;
|
||
this.dataList();
|
||
} else {
|
||
|
||
}
|
||
}
|
||
},
|
||
onLoad(option) {
|
||
// this.getDeptExamineAuth();
|
||
this.getsecondCardItems();
|
||
this.currentTabIndex = option.currentTabIndex || 0;
|
||
},
|
||
onShow() {
|
||
if (this.currentTabIndex == 0) {
|
||
this.getAllCardList()
|
||
} else {
|
||
this.page = 1;
|
||
this.loadingType = 0;
|
||
this.dataList();
|
||
}
|
||
},
|
||
methods: {
|
||
|
||
faceChange(evt){
|
||
this.isEnableFace = evt.target.value;
|
||
},
|
||
//办卡类型
|
||
showradio: function(index) {
|
||
var self = this;
|
||
self.firstIndex = index;
|
||
this.getsecondCardItems();
|
||
if(index==0){
|
||
this.unit= ''
|
||
this.personnel= ''
|
||
this.personnelPhone= ''
|
||
|
||
// this.idPhoto= []
|
||
// this.idPhotoId= []
|
||
// this.documentPhoto = [];
|
||
// this.documentPhotoId= [];
|
||
this.isEnableFace = '0'
|
||
this.accessArea = ''
|
||
this.areaData0 = []
|
||
this.areaData1 = []
|
||
}
|
||
if(index==1){
|
||
this.unit= ''
|
||
this.personnel= ''
|
||
this.personnelPhone= ''
|
||
|
||
// this.idPhoto= []
|
||
// this.idPhotoId= []
|
||
// this.documentPhoto = [];
|
||
// this.documentPhotoId= [];
|
||
this.accessArea = ''
|
||
this.getJbUnitItems3();
|
||
this.getDeptExamineAuth3();
|
||
}
|
||
if(index==2){
|
||
if (this.firstIndex == 1&&this.secondIndex==1){
|
||
this.getAllCardList();
|
||
}
|
||
}
|
||
if(index==3){
|
||
this.getReissueCardList();
|
||
}
|
||
},
|
||
// 获取证件类型
|
||
getsecondCardItems() {
|
||
this.secondIndex = 0;
|
||
var parentCode = this.firstCardItems[this.firstIndex].id;
|
||
let params = {
|
||
method: getCardType,
|
||
data: {
|
||
type: Number(parentCode),
|
||
userId: this.userInfo.id
|
||
}
|
||
};
|
||
callbackRequest(params).then(res => {
|
||
console.log("获取证件类型",res);
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
if (res.returnData.length > 0) {
|
||
this.secondCardItems = res.returnData;
|
||
this.getDeptExamineAuth()
|
||
} else {
|
||
this.secondCardItems = []
|
||
}
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
//选择证件类型
|
||
changesecondCardItems(e) {
|
||
this.secondIndex = e.detail.value;
|
||
if(this.firstIndex == 0&&this.secondIndex==0){
|
||
this.getDeptExamineAuth()
|
||
}else if(this.firstIndex == 0&&this.secondIndex==1){
|
||
this.getJbUnitItems();
|
||
}else if(this.firstIndex == 0&&this.secondIndex==2){
|
||
this.getJbUnitItems2();
|
||
}else if(this.firstIndex == 1&&this.secondIndex==0){
|
||
this.getJbUnitItems3();
|
||
}else if(this.firstIndex == 1&&this.secondIndex==1){
|
||
this.getJbUnitItems4();
|
||
}
|
||
console.log(this.secondIndex)
|
||
},
|
||
//新办卡-职工卡
|
||
//添加人员
|
||
addpeople0(){
|
||
uni.showModal({
|
||
title: '确认',
|
||
content: '请确认是否增加新的人员?',
|
||
showCancel: true,
|
||
cancelText: '取消',
|
||
confirmText: '确认',
|
||
success: res => {
|
||
if (res.confirm) {
|
||
this.peopleList0.push({
|
||
personnel: '',
|
||
unit: '',
|
||
personnelPhone: '',
|
||
faceImgs:[],
|
||
faceImgsId:[],
|
||
idPhotoes:[],
|
||
idPhotoesId: []
|
||
})
|
||
} else if (res.cancel) {}
|
||
}
|
||
});
|
||
},
|
||
//删除人员
|
||
delpeople0(peopleIndex){
|
||
uni.showModal({
|
||
title: '确认',
|
||
content: '请确认是否删除人员?',
|
||
showCancel: true,
|
||
cancelText: '取消',
|
||
confirmText: '确认',
|
||
success: res => {
|
||
if (res.confirm) {
|
||
this.peopleList0.splice(peopleIndex, 1);
|
||
} else if (res.cancel) {}
|
||
}
|
||
});
|
||
},
|
||
//新办卡-职工卡-获取审批人
|
||
getDeptExamineAuth() {
|
||
let params = {
|
||
method: getAuditCheckUser,
|
||
data: {
|
||
userId: getStorage('userInfo').userId,
|
||
cardType: this.secondCardItems[this.secondIndex].DESCRIPTION,
|
||
phone: getStorage('userInfo').telnumber,
|
||
}
|
||
};
|
||
console.log("params",params);
|
||
callbackRequest(params).then(res => {
|
||
console.log("新办卡-职工卡-获取审批人",res);
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
// console.log(res);
|
||
this.examList = res.returnData;
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
//新办卡-职工卡-选择审批人
|
||
changeExamList(e) {
|
||
// console.log(e)
|
||
this.examIndex = e.detail.value;
|
||
},
|
||
// --------第三方------------------
|
||
//获取项目归口管理部门
|
||
getJbUnitItems() {
|
||
this.unitIndex = 0;
|
||
let params = {
|
||
method: getDeptList,
|
||
data: {
|
||
phone: this.userInfo.telnumber,
|
||
userId: this.userInfo.id
|
||
}
|
||
};
|
||
callbackRequest(params).then(res => {
|
||
console.log("获取项目归口管理部门",res);
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
if (res.returnData.length > 0) {
|
||
this.unitList = res.returnData;
|
||
this.getJbUnitUserItems();
|
||
} else {
|
||
this.unitList = []
|
||
}
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
//新办卡-第三方-选择项目归口管理部门
|
||
changeUnit(e) {
|
||
console.log(this.unitList)
|
||
console.log(e)
|
||
this.unitIndex = e.detail.value;
|
||
this.getJbUnitUserItems();
|
||
this.getDeptExamineAuth1();
|
||
},
|
||
//获取项目归口管理部门经办人
|
||
getJbUnitUserItems() {
|
||
this.unitUserIndex = 0;
|
||
let params = {
|
||
method: getUserInfoByDept,
|
||
data: {
|
||
phone: this.userInfo.telnumber,
|
||
userId: this.userInfo.id,
|
||
xmgkOrgId:this.unitList[this.unitIndex].id
|
||
}
|
||
};
|
||
callbackRequest(params).then(res => {
|
||
console.log("获取项目归口管理部门经办人",res);
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
if (res.returnData.length > 0) {
|
||
this.unitUserList = res.returnData;
|
||
this.handlerPhone=this.unitUserList[this.unitUserIndex].phone;
|
||
} else {
|
||
this.unitUserList = []
|
||
}
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
//新办卡-第三方-选择项目归口管理部门经办人
|
||
changeUserUnit(e) {
|
||
console.log(e)
|
||
this.unitUserIndex = e.detail.value;
|
||
this.handlerPhone=this.unitUserList[this.unitUserIndex].phone;
|
||
},
|
||
//新办卡-第三方-选择申请类别
|
||
changeApplyType(e) {
|
||
console.log(e)
|
||
this.typeIndex = e.detail.value;
|
||
},
|
||
//新办卡-第三方-申请期限
|
||
changeLimitType(e) {
|
||
console.log(e)
|
||
this.limitIndex = e.detail.value;
|
||
},
|
||
//新办卡-第三方-获取审批人
|
||
getDeptExamineAuth1() {
|
||
let params = {
|
||
method: getAuditCheckUser2,
|
||
data: {
|
||
userId: getStorage('userInfo').userId,
|
||
cardType: this.secondCardItems[this.secondIndex].DESCRIPTION,
|
||
phone: getStorage('userInfo').telnumber,
|
||
xmgkOrgId:this.unitList[this.unitIndex].id,
|
||
}
|
||
};
|
||
console.log("params",params);
|
||
callbackRequest(params).then(res => {
|
||
console.log("新办卡-第三方-获取审批人",res);
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
// console.log(res);
|
||
this.examList1 = res.returnData;
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
//新办卡-第三方-选择审批人
|
||
changeExamList1(e) {
|
||
// console.log(e)
|
||
this.examIndex1 = e.detail.value;
|
||
},
|
||
// ----------VIP贵宾----------------
|
||
//获取新办卡-VIP贵宾-经办部门
|
||
getJbUnitItems2() {
|
||
this.unitIndex2 = 0;
|
||
let params = {
|
||
method: getDeptList,
|
||
data: {
|
||
phone: this.userInfo.telnumber,
|
||
userId: this.userInfo.id
|
||
}
|
||
};
|
||
callbackRequest(params).then(res => {
|
||
console.log("获取新办卡-VIP贵宾-经办部门",res);
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
if (res.returnData.length > 0) {
|
||
this.unitList2 = res.returnData;
|
||
this.getJbUnitUserItems2();
|
||
} else {
|
||
this.unitList = []
|
||
}
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
//新办卡-VIP贵宾-经办部门
|
||
changeUnit2(e) {
|
||
console.log(e)
|
||
this.unitIndex2 = e.detail.value;
|
||
this.getJbUnitUserItems2();
|
||
this.getDeptExamineAuth2()
|
||
},
|
||
//获取项目归口管理部门经办人
|
||
getJbUnitUserItems2() {
|
||
this.unitUserIndex2 = 0;
|
||
let params = {
|
||
method: getUserInfoByDept,
|
||
data: {
|
||
phone: this.userInfo.telnumber,
|
||
userId: this.userInfo.id,
|
||
xmgkOrgId:this.unitList2[this.unitIndex2].id
|
||
}
|
||
};
|
||
callbackRequest(params).then(res => {
|
||
console.log("获取项目归口管理部门经办人",res);
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
if (res.returnData.length > 0) {
|
||
this.unitUserList2 = res.returnData;
|
||
this.handlerPhone2=this.unitUserList2[this.unitUserIndex2].phone;
|
||
} else {
|
||
this.unitUserList2 = []
|
||
}
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
//新办卡-VIP贵宾-经办部门负责人
|
||
changeUserUnit2(e) {
|
||
console.log(e)
|
||
this.unitUserIndex2 = e.detail.value;
|
||
this.handlerPhone2=this.unitUserList2[this.unitUserIndex2].phone;
|
||
},
|
||
getDeptExamineAuth2() {
|
||
let params = {
|
||
method: getAuditCheckUser2,
|
||
data: {
|
||
userId: getStorage('userInfo').userId,
|
||
cardType: this.secondCardItems[this.secondIndex].DESCRIPTION,
|
||
phone: getStorage('userInfo').telnumber,
|
||
xmgkOrgId:this.unitList2[this.unitIndex2].id,
|
||
}
|
||
};
|
||
console.log("params",params);
|
||
callbackRequest(params).then(res => {
|
||
console.log("新办卡-VIP贵宾-获取审批人",res);
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
// console.log(res);
|
||
this.examList2 = res.returnData;
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
//新办卡-VIP贵宾-选择审批人
|
||
changeExamList2(e) {
|
||
// console.log(e)
|
||
this.examIndex2 = e.detail.value;
|
||
},
|
||
// -----------临时出入证---------------
|
||
//获取新办卡-临时出入证-经办部门
|
||
getJbUnitItems3() {
|
||
this.unitIndex3 = 0;
|
||
let params = {
|
||
method: getDeptList,
|
||
data: {
|
||
phone: this.userInfo.telnumber,
|
||
userId: this.userInfo.id
|
||
}
|
||
};
|
||
callbackRequest(params).then(res => {
|
||
console.log("获取新办卡-临时出入证-经办部门",res);
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
if (res.returnData.length > 0) {
|
||
this.unitList3 = res.returnData;
|
||
this.getJbUnitUserItems3();
|
||
} else {
|
||
this.unitList3 = []
|
||
}
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
//新办证-临时出入证-选择项目归口管理部门
|
||
changeUnit3(e) {
|
||
console.log(e)
|
||
this.unitIndex3 = e.detail.value;
|
||
this.getJbUnitUserItems3();
|
||
this.getDeptExamineAuth3();
|
||
},
|
||
//获取项目归口管理部门经办人
|
||
getJbUnitUserItems3() {
|
||
this.unitUserIndex3 = 0;
|
||
let params = {
|
||
method: getUserInfoByDept,
|
||
data: {
|
||
phone: this.userInfo.telnumber,
|
||
userId: this.userInfo.id,
|
||
xmgkOrgId:this.unitList3[this.unitIndex3].id
|
||
}
|
||
};
|
||
callbackRequest(params).then(res => {
|
||
console.log("获取项目归口管理部门经办人",res);
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
if (res.returnData.length > 0) {
|
||
this.unitUserList3 = res.returnData;
|
||
} else {
|
||
this.unitUserList3 = []
|
||
}
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
//新办卡-临时出入证-经办部门负责人
|
||
changeUserUnit3(e) {
|
||
console.log(e)
|
||
this.unitUserIndex3 = e.detail.value;
|
||
},
|
||
//获取新办证-临时出入证-项目归口部门负责人
|
||
getDeptExamineAuth3() {
|
||
this.examIndex3=0;
|
||
let params = {
|
||
method: getAuditCheckUser2,
|
||
data: {
|
||
userId: getStorage('userInfo').userId,
|
||
cardType: this.secondCardItems[this.secondIndex].DESCRIPTION,
|
||
phone: getStorage('userInfo').telnumber,
|
||
xmgkOrgId:this.unitList3[this.unitIndex3].id,
|
||
}
|
||
};
|
||
console.log("params",params);
|
||
callbackRequest(params).then(res => {
|
||
console.log("获取新办证-临时出入证-项目归口部门负责人",res);
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
// console.log(res);
|
||
this.examList3 = res.returnData;
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
//新办证-临时出入证-项目归口部门负责人
|
||
changeExamList3(e) {
|
||
// console.log(e)
|
||
this.examIndex3 = e.detail.value;
|
||
},
|
||
//出入区域
|
||
accessAreaChecked(e){
|
||
this.accessArea = e.detail.value
|
||
},
|
||
//添加人员
|
||
addpeople1(){
|
||
uni.showModal({
|
||
title: '确认',
|
||
content: '请确认是否增加新的人员?',
|
||
showCancel: true,
|
||
cancelText: '取消',
|
||
confirmText: '确认',
|
||
success: res => {
|
||
if (res.confirm) {
|
||
this.peopleList1.push({
|
||
personnelName: '',
|
||
faceImgs:[],
|
||
faceImgsId:[],
|
||
})
|
||
} else if (res.cancel) {}
|
||
}
|
||
});
|
||
},
|
||
//删除人员
|
||
delpeople1(peopleIndex){
|
||
uni.showModal({
|
||
title: '确认',
|
||
content: '请确认是否删除人员?',
|
||
showCancel: true,
|
||
cancelText: '取消',
|
||
confirmText: '确认',
|
||
success: res => {
|
||
if (res.confirm) {
|
||
this.peopleList1.splice(peopleIndex, 1);
|
||
} else if (res.cancel) {}
|
||
}
|
||
});
|
||
},
|
||
//-------------施工出入证------------------
|
||
//获取新办卡-施工出入证-经办部门
|
||
getJbUnitItems4() {
|
||
this.unitIndex4 = 0;
|
||
let params = {
|
||
method: getDeptList,
|
||
data: {
|
||
phone: this.userInfo.telnumber,
|
||
userId: this.userInfo.id
|
||
}
|
||
};
|
||
callbackRequest(params).then(res => {
|
||
console.log("获取新办卡-施工出入证-经办部门",res);
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
if (res.returnData.length > 0) {
|
||
this.unitList4 = res.returnData;
|
||
this.getJbUnitUserItems3();
|
||
} else {
|
||
this.unitList4 = []
|
||
}
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
//新办证-施工出入证-选择项目归口管理部门
|
||
changeUnit4(e) {
|
||
console.log(e)
|
||
this.unitIndex4 = e.detail.value;
|
||
this.getJbUnitUserItems4();
|
||
this.getDeptExamineAuth4();
|
||
},
|
||
//获取项目归口管理部门经办人
|
||
getJbUnitUserItems4() {
|
||
this.unitUserIndex4 = 0;
|
||
let params = {
|
||
method: getUserInfoByDept,
|
||
data: {
|
||
phone: this.userInfo.telnumber,
|
||
userId: this.userInfo.id,
|
||
xmgkOrgId:this.unitList4[this.unitIndex4].id
|
||
}
|
||
};
|
||
callbackRequest(params).then(res => {
|
||
console.log("获取项目归口管理部门经办人",res);
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
if (res.returnData.length > 0) {
|
||
this.unitUserList4 = res.returnData;
|
||
this.handlerPhone4=this.unitUserList4[this.unitUserIndex4].phone;
|
||
} else {
|
||
this.unitUserList4 = []
|
||
}
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
//新办卡-施工出入证-经办部门负责人
|
||
changeUserUnit4(e) {
|
||
this.unitUserIndex4 = e.detail.value;
|
||
this.handlerPhone4=this.unitUserList4[this.unitUserIndex4].phone;
|
||
},
|
||
//获取新办证-施工出入证-项目归口部门负责人
|
||
getDeptExamineAuth4() {
|
||
this.examIndex4=0;
|
||
let params = {
|
||
method: getAuditCheckUser2,
|
||
data: {
|
||
userId: getStorage('userInfo').userId,
|
||
cardType: this.secondCardItems[this.secondIndex].DESCRIPTION,
|
||
phone: getStorage('userInfo').telnumber,
|
||
xmgkOrgId:this.unitList4[this.unitIndex4].id,
|
||
}
|
||
};
|
||
console.log("params",params);
|
||
callbackRequest(params).then(res => {
|
||
console.log("获取新办证-临时出入证-项目归口部门负责人",res);
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
// console.log(res);
|
||
this.examList4 = res.returnData;
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
//新办证-施工出入证-项目归口部门负责人
|
||
changeExamList4(e) {
|
||
// console.log(e)
|
||
this.examIndex4 = e.detail.value;
|
||
},
|
||
//新办证-施工出入证-出入区域
|
||
accessAreaChecked1(e){
|
||
this.accessArea1 = e.detail.value
|
||
},
|
||
//添加人员
|
||
addpeople2(){
|
||
uni.showModal({
|
||
title: '确认',
|
||
content: '请确认是否增加新的人员?',
|
||
showCancel: true,
|
||
cancelText: '取消',
|
||
confirmText: '确认',
|
||
success: res => {
|
||
if (res.confirm) {
|
||
this.peopleList2.push({
|
||
personnelName: '',
|
||
idNumber:"",
|
||
faceImgs:[],
|
||
faceImgsId:[],
|
||
})
|
||
} else if (res.cancel) {}
|
||
}
|
||
});
|
||
},
|
||
//删除人员
|
||
delpeople2(peopleIndex){
|
||
uni.showModal({
|
||
title: '确认',
|
||
content: '请确认是否删除人员?',
|
||
showCancel: true,
|
||
cancelText: '取消',
|
||
confirmText: '确认',
|
||
success: res => {
|
||
if (res.confirm) {
|
||
this.peopleList2.splice(peopleIndex, 1);
|
||
} else if (res.cancel) {}
|
||
}
|
||
});
|
||
},
|
||
//提交(新办卡,新办证)
|
||
submit() {
|
||
console.log(this.firstIndex)
|
||
console.log(this.secondIndex)
|
||
console.log(this.peopleList0)
|
||
console.log("userInfo",this.userInfo)
|
||
var regPhone = /^1[3|4|5|6|7|8|9]\d{9}$/;
|
||
let params = {};
|
||
// var regCard = /^[a-zA-Z0-9_]{0,}$/;
|
||
// var regNumber = /[^\d]/;
|
||
if (this.firstIndex == 0&&this.secondIndex==0) {
|
||
var persons=this.peopleList0;
|
||
if(persons.length<1){
|
||
alertTip('请输入人员信息');
|
||
return false;
|
||
}
|
||
var personnelFlage=0;
|
||
var personnelMsg="";
|
||
persons.forEach((item, index) => {
|
||
if (!item.personnel) {
|
||
personnelMsg='请输入人员姓名';
|
||
personnelFlage=1;
|
||
return false;
|
||
}
|
||
if (!item.unit) {
|
||
personnelMsg='请输入人员部门';
|
||
personnelFlage=1;
|
||
return false;
|
||
}
|
||
if (!regPhone.test(item.personnelPhone)) {
|
||
personnelMsg='请输入正确的手机号';
|
||
personnelFlage=1;
|
||
return false;
|
||
}
|
||
if (this.isEnableFace=='1') {
|
||
if (item.faceImgsId.length==0) {
|
||
personnelMsg='请选择登记照片';
|
||
personnelFlage=1;
|
||
return false;
|
||
}
|
||
}
|
||
})
|
||
if(personnelFlage==1){
|
||
alertTip(personnelMsg);
|
||
return false;
|
||
}
|
||
if(this.areaData0.length>0){
|
||
let idList = this.areaData0.map(item=>{
|
||
return item.areaIds
|
||
})
|
||
this.accessArea =idList.join(',')
|
||
}
|
||
if (!this.accessArea) {
|
||
alertTip('请选择出入区域');
|
||
return false;
|
||
}
|
||
const peopleListd=[];
|
||
this.peopleList0.forEach((item, index) => {
|
||
const itemd={
|
||
personnel: '',
|
||
unit: '',
|
||
personnelPhone: '',
|
||
photo:'',
|
||
idPhoto: ''
|
||
};
|
||
itemd.personnel=item.personnel;
|
||
itemd.unit=item.unit;
|
||
itemd.personnelPhone=item.personnelPhone;
|
||
itemd.idPhoto=item.faceImgsId.toString();
|
||
itemd.photo=item.idPhotoesId.toString();
|
||
peopleListd.push(itemd);
|
||
})
|
||
params = {
|
||
method: addCardData,
|
||
data: {
|
||
userId: this.userInfo.id,
|
||
phone: this.userInfo.telnumber,
|
||
cardType: this.secondCardItems[this.secondIndex].DESCRIPTION,//证件类型
|
||
userName: this.userInfo.userName,
|
||
orgId: this.userInfo.orgId,
|
||
orgName: this.userInfo.orgName,
|
||
type: this.firstCardItems[this.firstIndex].id,//办卡类型
|
||
typeName: this.firstCardItems[this.firstIndex].name,//办卡名称
|
||
|
||
userInfoVos: peopleListd,
|
||
|
||
isEnableFace: this.isEnableFace,//人脸权限
|
||
checkId:this.examList[this.examIndex].checkId,
|
||
checkUserId: this.examList[this.examIndex].userId,
|
||
checkUserName: this.examList[this.examIndex].userName,
|
||
accessArea: this.accessArea,//出入区域
|
||
checkRole: this.examList[this.examIndex].checkRole,
|
||
}
|
||
};
|
||
}else if (this.firstIndex == 0&&this.secondIndex==1) {
|
||
if (!this.handlerPhone) {
|
||
alertTip('请输入经办人联系电话');
|
||
return false;
|
||
}
|
||
if (!regPhone.test(this.handlerPhone)) {
|
||
alertTip('请输入正确的经办人手机号');
|
||
return false;
|
||
}
|
||
if (!this.personnelName) {
|
||
alertTip('请输入申请人姓名');
|
||
return false;
|
||
}
|
||
if (!this.unitName) {
|
||
alertTip('请输入所属部门');
|
||
return false;
|
||
}
|
||
if (!this.personnelPhone) {
|
||
alertTip('请输入申请人联系电话');
|
||
return false;
|
||
}
|
||
if (!regPhone.test(this.personnelPhone)) {
|
||
alertTip('请输入正确的申请人手机号');
|
||
return false;
|
||
}
|
||
if(this.areaData1.length>0){
|
||
let idList = this.areaData1.map(item=>{
|
||
return item.areaIds
|
||
})
|
||
this.accessArea1 =idList.join(',')
|
||
}
|
||
if (!this.accessArea1) {
|
||
alertTip('请选择出入区域');
|
||
return false;
|
||
}
|
||
if(this.faceImgsId.length<1){
|
||
alertTip('缺少人脸图片');
|
||
return false;
|
||
}
|
||
if(this.idPhotoesId.length>0&&this.idPhotoesId.length<2){
|
||
alertTip('身份证照片需要两张');
|
||
return false;
|
||
}
|
||
const peopleListd=[{
|
||
personnel: this.personnelName,
|
||
personnelPhone: this.personnelPhone,
|
||
unit: this.unitName,
|
||
photo: this.idPhotoesId.toString(),
|
||
idPhoto: this.faceImgsId.toString(),
|
||
documentation: this.situationPhotoesId.toString()
|
||
}];
|
||
params = {
|
||
method: addCardData,
|
||
data: {
|
||
userId: this.userInfo.id,
|
||
phone: this.userInfo.telnumber,
|
||
cardType: this.secondCardItems[this.secondIndex].DESCRIPTION,//证件类型
|
||
userName: this.userInfo.userName,
|
||
orgId: this.userInfo.orgId,
|
||
orgName: this.userInfo.orgName,
|
||
type: this.firstCardItems[this.firstIndex].id,//办卡类型
|
||
typeName: this.firstCardItems[this.firstIndex].name,//办卡名称
|
||
xmgkOrgId: this.unitList[this.unitIndex].id,
|
||
xmgkOrgName:this.unitList[this.unitIndex].name,
|
||
jbUserId: this.unitUserList[this.unitUserIndex].id ,
|
||
jbUserPhone: this.handlerPhone,
|
||
jbUserName: this.unitUserList[this.unitUserIndex].name ,
|
||
applyType: this.typeList[this.typeIndex].name,
|
||
applyTerm: this.limitList[this.limitIndex].names,
|
||
|
||
userInfoVos: peopleListd,
|
||
|
||
isEnableFace: this.isEnableFace1,//人脸权限
|
||
checkId:this.examList1[this.examIndex1].checkId,
|
||
checkUserId: this.examList1[this.examIndex1].userId,
|
||
checkUserName: this.examList1[this.examIndex1].userName,
|
||
accessArea: this.accessArea1,//出入区域
|
||
checkRole: this.examList1[this.examIndex1].checkRole,
|
||
}
|
||
};
|
||
console.log("params",params)
|
||
}else if (this.firstIndex == 0&&this.secondIndex==2) {
|
||
if (this.unitUserList2.length<1||!this.unitUserList2[this.unitUserIndex2].name) {
|
||
alertTip('请输入经办人');
|
||
return false;
|
||
}
|
||
if (!this.handlerPhone2) {
|
||
alertTip('请输入经办人联系电话');
|
||
return false;
|
||
}
|
||
if (!regPhone.test(this.handlerPhone2)) {
|
||
alertTip('请输入正确的经办人手机号');
|
||
return false;
|
||
}
|
||
if (!this.outDate) {
|
||
alertTip('请输入借出时间');
|
||
return false;
|
||
}
|
||
if (!this.backDate) {
|
||
alertTip('请输入归还时间');
|
||
return false;
|
||
}
|
||
params = {
|
||
method: addCardData,
|
||
data: {
|
||
userId: this.userInfo.id,
|
||
phone: this.userInfo.telnumber,
|
||
cardType: this.secondCardItems[this.secondIndex].DESCRIPTION,//证件类型
|
||
userName: this.userInfo.userName,
|
||
orgId: this.userInfo.orgId,
|
||
orgName: this.userInfo.orgName,
|
||
type: this.firstCardItems[this.firstIndex].id,//办卡类型
|
||
typeName: this.firstCardItems[this.firstIndex].name,//办卡名称
|
||
jbUserId: this.unitUserList2[this.unitUserIndex2].id ,
|
||
jbUserPhone: this.handlerPhone2,
|
||
jbUserName: this.unitUserList2[this.unitUserIndex2].name ,
|
||
|
||
lendTime: this.outDate,
|
||
backTime: this.backDate,
|
||
actualBackTime: this.realBackDate,
|
||
remark: this.remarks,
|
||
|
||
checkId:this.examList2[this.examIndex2].checkId,
|
||
checkUserId: this.examList2[this.examIndex2].userId,
|
||
checkUserName: this.examList2[this.examIndex2].userName,
|
||
checkRole: this.examList2[this.examIndex2].checkRole,
|
||
documentation:this.documentPhotoId.toString()
|
||
}
|
||
};
|
||
console.log("params",params)
|
||
}else if (this.firstIndex == 1&&this.secondIndex==0) {
|
||
if (!this.proName) {
|
||
alertTip('请输入项目名称');
|
||
return false;
|
||
}
|
||
if (!this.proUnitName) {
|
||
alertTip('请输入项目单位');
|
||
return false;
|
||
}
|
||
if (!this.proUserName) {
|
||
alertTip('请输入项目负责人');
|
||
return false;
|
||
}
|
||
if (!this.proUserPhone) {
|
||
alertTip('请输入手机号码');
|
||
return false;
|
||
}
|
||
if (!regPhone.test(this.proUserPhone)) {
|
||
alertTip('请输入正确的项目负责人手机号');
|
||
return false;
|
||
}
|
||
if (this.unitUserList3.length<1||!this.unitUserList3[this.unitUserIndex3].name) {
|
||
alertTip('请输入经办人');
|
||
return false;
|
||
}
|
||
if (!this.dateRange[0]) {
|
||
alertTip('请输入合同有效期');
|
||
return false;
|
||
}
|
||
if(this.accessArea.length<1){
|
||
alertTip('请选择区域');
|
||
return false;
|
||
}
|
||
const peopleListd=[];
|
||
if(this.peopleList1.length<1){
|
||
alertTip('填写人员信息');
|
||
return false;
|
||
}
|
||
var txflage=0;
|
||
var txmsg="";
|
||
this.peopleList1.forEach((item, index) => {
|
||
const itemd={personnel: '',idPhoto: ''};
|
||
if(!item.personnelName){
|
||
txflage=1;
|
||
txmsg="填写人员姓名";
|
||
}
|
||
itemd.personnel=item.personnelName;
|
||
if(item.faceImgsId.length<1){
|
||
txflage=1;
|
||
txmsg="缺少人脸图片";
|
||
}
|
||
itemd.idPhoto=item.faceImgsId.toString();
|
||
peopleListd.push(itemd);
|
||
})
|
||
if(txflage==1){
|
||
alertTip(txmsg);
|
||
return false;
|
||
}
|
||
params = {
|
||
method: addCardData,
|
||
data: {
|
||
userId: this.userInfo.id,
|
||
phone: this.userInfo.telnumber,
|
||
cardType: this.secondCardItems[this.secondIndex].DESCRIPTION,//证件类型
|
||
userName: this.userInfo.userName,
|
||
orgId: this.userInfo.orgId,
|
||
orgName: this.userInfo.orgName,
|
||
type: this.firstCardItems[this.firstIndex].id,//办卡类型
|
||
typeName: this.firstCardItems[this.firstIndex].name,//办卡名称
|
||
xmgkOrgId: this.unitList3[this.unitIndex3].id,
|
||
xmgkOrgName: this.unitList3[this.unitIndex3].name,
|
||
jbUserId: this.unitUserList3[this.unitUserIndex3].id ,
|
||
jbUserName: this.unitUserList3[this.unitUserIndex3].name,
|
||
|
||
documentation:this.documentPhotoId.toString(),
|
||
proName: this.proName,
|
||
proUnit: this.proUnitName,
|
||
proManager: this.proUserName,
|
||
proManagerPhone: this.proUserPhone,
|
||
contractStartTime: this.dateRange[0],
|
||
contractEndTime: this.dateRange[1],
|
||
bzNum: peopleListd.length,
|
||
userInfoVos:peopleListd,
|
||
|
||
checkId:this.examList3[this.examIndex3].checkId,
|
||
checkUserId: this.examList3[this.examIndex3].userId,
|
||
checkUserName: this.examList3[this.examIndex3].userName,
|
||
accessArea: this.accessArea.toString(),//出入区域
|
||
checkRole: this.examList3[this.examIndex3].checkRole,
|
||
}
|
||
};
|
||
console.log("params",params)
|
||
}else if (this.firstIndex == 1&&this.secondIndex==1) {
|
||
if (!this.work) {
|
||
alertTip('请输入工作内容');
|
||
return false;
|
||
}
|
||
if (!this.workUnit) {
|
||
alertTip('请输入作业单位');
|
||
return false;
|
||
}
|
||
if (!this.workCharger) {
|
||
alertTip('请输入工作负责人');
|
||
return false;
|
||
}
|
||
if (!this.handlerPhone4) {
|
||
alertTip('请输入手机号码');
|
||
return false;
|
||
}
|
||
if (!regPhone.test(this.handlerPhone4)) {
|
||
alertTip('请输入正确的经办人员手机号');
|
||
return false;
|
||
}
|
||
if (!this.workChargerPhone) {
|
||
alertTip('请输入工作负责人手机号码');
|
||
return false;
|
||
}
|
||
if (!regPhone.test(this.workChargerPhone)) {
|
||
alertTip('请输入正确的工作负责人手机号');
|
||
return false;
|
||
}
|
||
if (!this.dateRange2[0]) {
|
||
alertTip('请输入合同时间');
|
||
return false;
|
||
}
|
||
if(this.accessArea1.length<1){
|
||
alertTip('请选择区域');
|
||
return false;
|
||
}
|
||
var txflage=0;
|
||
var txmsg="";
|
||
const peopleListd=[];
|
||
this.peopleList2.forEach((item, index) => {
|
||
const itemd={
|
||
personnel: '',
|
||
idNumber:'',
|
||
idPhoto: ''
|
||
};
|
||
if(!item.personnelName){
|
||
txflage=1;
|
||
txmsg="填写人员姓名";
|
||
}
|
||
itemd.personnel=item.personnelName;
|
||
if(item.faceImgsId.length<1){
|
||
txflage=1;
|
||
txmsg="缺少人脸图片";
|
||
}
|
||
itemd.idPhoto=item.faceImgsId.toString();
|
||
if(!item.idNumber){
|
||
txflage=1;
|
||
txmsg="填写身份证ID";
|
||
}
|
||
itemd.idNumber=item.idNumber;
|
||
peopleListd.push(itemd);
|
||
})
|
||
if(txflage==1){
|
||
alertTip(txmsg);
|
||
return false;
|
||
}
|
||
params = {
|
||
method: addCardData,
|
||
data: {
|
||
userId: this.userInfo.id,
|
||
phone: this.userInfo.telnumber,
|
||
cardType: this.secondCardItems[this.secondIndex].DESCRIPTION,//证件类型
|
||
userName: this.userInfo.userName,
|
||
orgId: this.userInfo.orgId,
|
||
orgName: this.userInfo.orgName,
|
||
type: this.firstCardItems[this.firstIndex].id,//办卡类型
|
||
typeName: this.firstCardItems[this.firstIndex].name,//办卡名称
|
||
xmgkOrgId: this.unitList4[this.unitIndex4].id,
|
||
xmgkOrgName: this.unitList4[this.unitIndex4].name,
|
||
jbUserId: this.unitUserList4[this.unitUserIndex4].id ,
|
||
jbUserName: this.unitUserList4[this.unitUserIndex4].name,
|
||
jbUserPhone: this.unitUserList4[this.unitUserIndex4].phone,
|
||
|
||
proUnit: this.workUnit,
|
||
proManager: this.workCharger,
|
||
proManagerPhone: this.workChargerPhone,
|
||
workContent: this.work,
|
||
ticketNo: this.ticketNo,
|
||
carNum: this.licenseNumber,
|
||
|
||
contractStartTime: this.dateRange2[0],
|
||
contractEndTime: this.dateRange2[1],
|
||
bzNum: peopleListd.length,
|
||
userInfoVos:peopleListd,
|
||
|
||
checkId:this.examList4[this.examIndex4].checkId,
|
||
checkUserId: this.examList4[this.examIndex4].userId,
|
||
checkUserName: this.examList4[this.examIndex4].userName,
|
||
accessArea: this.accessArea1.toString(),//出入区域
|
||
checkRole: this.examList4[this.examIndex4].checkRole,
|
||
}
|
||
};
|
||
console.log("params",params)
|
||
}
|
||
|
||
if (!this.submitFlag) {
|
||
return false;
|
||
}
|
||
// this.submitFlag = false;
|
||
callbackRequest(params).then(res => {
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
alertTip(res.returnMsg);
|
||
setTimeout(_ => {
|
||
this.unit = '';
|
||
this.personnel = '';
|
||
this.personnelPhone = '';
|
||
this.accessArea = '';
|
||
this.scienceTechRemarks = '';
|
||
this.dispatchRemarks = '';
|
||
this.logisticsRemarks = '';
|
||
this.dateRange = '';
|
||
this.isEnableFace = '0'
|
||
this.areaData0 = [];
|
||
this.areaData1 = [];
|
||
|
||
// this.idPhoto = [];
|
||
// this.idPhotoId = [];
|
||
this.documentPhoto = [];
|
||
this.documentPhotoId= [];
|
||
this.currentTabIndex = 1;
|
||
this.submitFlag = true;
|
||
}, 2000);
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
this.submitFlag = true;
|
||
}
|
||
});
|
||
},
|
||
//办卡-人脸照片-职工卡-多人多张图片
|
||
async chooseFaceImg(peopleIndex) {
|
||
let chec = 0;
|
||
let sty = [];
|
||
let _this = this;
|
||
uni.showActionSheet({
|
||
itemList: ['拍照', '相册'],
|
||
success: function(resp) {
|
||
chec = resp.tapIndex;
|
||
if (chec == 0) {
|
||
sty = ['camera']; //从相册相机选择
|
||
} else {
|
||
sty = ['album']; //从相册相机选择
|
||
}
|
||
uni.chooseImage({
|
||
count: 1,
|
||
sizeType: ['compressed'],
|
||
sourceType: sty,
|
||
quality: 1,
|
||
success: async function(res) {
|
||
let resData = res.tempFilePaths;
|
||
for (let i = 0; i < resData.length; i++) {
|
||
if (_this.peopleList0[peopleIndex].faceImgs.length > 1) {
|
||
break;
|
||
}
|
||
uni.getImageInfo({
|
||
src: resData[i],
|
||
success: async (path) => {
|
||
convertImgToBase64(path.path,async function(base64) {
|
||
if (_this.peopleList0[peopleIndex].faceImgs.length < 1) {
|
||
uni.showLoading({title: '图片上传中'})
|
||
let blength = base64.length;
|
||
let glength = 7500;
|
||
// console.log("base64:",base64)
|
||
if (blength <= glength) {
|
||
let uploadParam = {
|
||
base64: base64,
|
||
userId: getStorage('userInfo').userId + i,
|
||
groupEnd: '1'
|
||
}
|
||
await uploadImg(uploadParam).then(resu => {
|
||
resu = resu.data;
|
||
uni.hideLoading();
|
||
if (resu.returnCode !=1) {
|
||
alertTip(resu.returnMsg);
|
||
} else {
|
||
_this.peopleList0[peopleIndex].faceImgs.push(base64);
|
||
_this.peopleList0[peopleIndex].faceImgsId.push(resu.returnData + ".jpg");
|
||
}
|
||
});
|
||
} else {
|
||
let fnum = parseInt(blength / glength);
|
||
for (let j =1; j < fnum + 1; j++) {
|
||
if (j == fnum) {
|
||
let groupBase = base64.slice((j-1)*glength);
|
||
let uploadParam = {
|
||
base64: groupBase,
|
||
userId: getStorage('userInfo').userId +i,
|
||
groupEnd: '1'
|
||
}
|
||
await uploadImg(uploadParam).then(resu => {
|
||
resu = resu.data;
|
||
if (resu.returnCode==1) {
|
||
_this.peopleList0[peopleIndex].faceImgs.push(base64);
|
||
_this.peopleList0[peopleIndex].faceImgsId.push(resu.returnData+".jpg");
|
||
} else {
|
||
uni.hideLoading();
|
||
alertTip(resu.returnMsg);
|
||
return;
|
||
}
|
||
});
|
||
} else {
|
||
let groupBase =base64.slice((j-1)*glength,glength*j);
|
||
let uploadParam = {
|
||
base64: groupBase,
|
||
userId: getStorage('userInfo').userId+i,
|
||
groupEnd: '0'
|
||
}
|
||
await uploadImg(uploadParam).then(resu => {
|
||
resu = resu.data;
|
||
if (resu.returnCode ==1) {
|
||
|
||
} else {
|
||
uni.hideLoading();
|
||
alertTip(resu.returnMsg);
|
||
return;
|
||
}
|
||
});
|
||
}
|
||
}
|
||
uni.hideLoading();
|
||
}
|
||
}
|
||
});
|
||
},
|
||
});
|
||
}
|
||
}
|
||
});
|
||
},
|
||
fail: function(resp) {
|
||
console.log(resp.errMsg);
|
||
}
|
||
});
|
||
},
|
||
//删除人脸照片-职工卡
|
||
removeFaceImg(peopleIndex,index) {
|
||
this.peopleList0[peopleIndex].faceImgs.splice(index, 1);
|
||
this.peopleList0[peopleIndex].faceImgsId.splice(index, 1);
|
||
},
|
||
//办卡-身份证照片-职工卡-多人多张图片
|
||
async chooseIdCardImg(peopleIndex) {
|
||
let chec = 0;
|
||
let sty = [];
|
||
let _this = this;
|
||
uni.showActionSheet({
|
||
itemList: ['拍照', '相册'],
|
||
success: function(resp) {
|
||
chec = resp.tapIndex;
|
||
if (chec == 0) {
|
||
sty = ['camera']; //从相册相机选择
|
||
} else {
|
||
sty = ['album']; //从相册相机选择
|
||
}
|
||
uni.chooseImage({
|
||
count: 2,
|
||
sizeType: ['compressed'],
|
||
sourceType: sty,
|
||
quality: 1,
|
||
success: async function(res) {
|
||
let resData = res.tempFilePaths;
|
||
for (let i = 0; i < resData.length; i++) {
|
||
if (_this.peopleList0[peopleIndex].idPhotoes.length > 2) {
|
||
break;
|
||
}
|
||
uni.getImageInfo({
|
||
src: resData[i],
|
||
success: async (path) => {
|
||
convertImgToBase64(path.path,async function(base64) {
|
||
if (_this.peopleList0[peopleIndex].idPhotoes.length < 2) {
|
||
uni.showLoading({
|
||
title: '图片上传中'
|
||
})
|
||
let blength = base64.length;
|
||
let glength = 7500;
|
||
// console.log("base64:",base64)
|
||
if (blength <= glength) {
|
||
let uploadParam = {
|
||
base64: base64,
|
||
userId: getStorage('userInfo').userId +i,
|
||
groupEnd: '1'
|
||
}
|
||
await uploadImg(uploadParam).then(resu => {
|
||
resu =resu.data;
|
||
uni.hideLoading();
|
||
if (resu.returnCode !=1) {
|
||
alertTip(resu.returnMsg);
|
||
} else {
|
||
_this.peopleList0[peopleIndex].idPhotoes.push(base64);
|
||
_this.peopleList0[peopleIndex].idPhotoesId.push(resu.returnData +".jpg");
|
||
}
|
||
});
|
||
} else {
|
||
let fnum =parseInt(blength /glength);
|
||
for (let j =1; j <fnum +1; j++) {
|
||
if (j ==fnum) {
|
||
let groupBase =base64.slice((j -1) *glength);
|
||
console.log(groupBase.length,"groupBaselength");
|
||
let uploadParam = {
|
||
base64: groupBase,
|
||
userId: getStorage('userInfo').userId + i,
|
||
groupEnd: '1'
|
||
}
|
||
await uploadImg(uploadParam).then(resu => {
|
||
resu = resu.data;
|
||
if (resu.returnCode == 1) {
|
||
_this.peopleList0[peopleIndex].idPhotoes.push(base64);
|
||
_this.peopleList0[peopleIndex].idPhotoesId.push(resu.returnData +".jpg");
|
||
} else {
|
||
uni.hideLoading();
|
||
alertTip(resu.returnMsg);
|
||
return;
|
||
}
|
||
}
|
||
);
|
||
} else {
|
||
let groupBase =base64.slice((j - 1) * glength,glength * j);
|
||
let uploadParam = {
|
||
base64: groupBase,
|
||
userId: getStorage('userInfo').userId + i,
|
||
groupEnd: '0'
|
||
}
|
||
await uploadImg(uploadParam).then(resu => {
|
||
resu = resu.data;
|
||
if (resu.returnCode == 1) {
|
||
|
||
} else {
|
||
uni.hideLoading();
|
||
alertTip(resu.returnMsg);
|
||
return;
|
||
}
|
||
}
|
||
);
|
||
}
|
||
}
|
||
uni.hideLoading();
|
||
}
|
||
}
|
||
});
|
||
},
|
||
});
|
||
}
|
||
}
|
||
});
|
||
},
|
||
fail: function(resp) {
|
||
console.log(resp.errMsg);
|
||
}
|
||
});
|
||
},
|
||
//删除身份证图片
|
||
removeIdCardImg(peopleIndex,index) {
|
||
this.peopleList0[peopleIndex].idPhotoes.splice(index, 1);
|
||
this.peopleList0[peopleIndex].idPhotoesId.splice(index, 1);
|
||
},
|
||
//办卡-人脸照片-第三方人员-单人多张图片
|
||
async chooseFaceImg2() {
|
||
let chec = 0;
|
||
let sty = [];
|
||
let _this = this;
|
||
uni.showActionSheet({
|
||
itemList: ['拍照', '相册'],
|
||
success: function(resp) {
|
||
chec = resp.tapIndex;
|
||
if (chec == 0) {
|
||
sty = ['camera']; //从相册相机选择
|
||
} else {
|
||
sty = ['album']; //从相册相机选择
|
||
}
|
||
uni.chooseImage({
|
||
count: 1,
|
||
sizeType: ['compressed'],
|
||
sourceType: sty,
|
||
quality: 1,
|
||
success: async function(res) {
|
||
let resData = res.tempFilePaths;
|
||
for (let i = 0; i < resData.length; i++) {
|
||
if (_this.faceImgs.length > 1) {
|
||
break;
|
||
}
|
||
uni.getImageInfo({
|
||
src: resData[i],
|
||
success: async (path) => {
|
||
convertImgToBase64(path.path,async function(base64) {
|
||
if (_this.faceImgs.length < 1) {
|
||
uni.showLoading({title: '图片上传中'})
|
||
let blength = base64.length;
|
||
let glength = 7500;
|
||
// console.log("base64:",base64)
|
||
if (blength <= glength) {
|
||
let uploadParam = {
|
||
base64: base64,
|
||
userId: getStorage('userInfo').userId + i,
|
||
groupEnd: '1'
|
||
}
|
||
await uploadImg(uploadParam).then(resu => {
|
||
resu = resu.data;
|
||
uni.hideLoading();
|
||
if (resu.returnCode !=1) {
|
||
alertTip(resu.returnMsg);
|
||
} else {
|
||
_this.faceImgs.push(base64);
|
||
_this.faceImgsId.push(resu.returnData + ".jpg");
|
||
}
|
||
});
|
||
} else {
|
||
let fnum = parseInt(blength / glength);
|
||
for (let j =1; j < fnum + 1; j++) {
|
||
if (j == fnum) {
|
||
let groupBase = base64.slice((j-1)*glength);
|
||
let uploadParam = {
|
||
base64: groupBase,
|
||
userId: getStorage('userInfo').userId +i,
|
||
groupEnd: '1'
|
||
}
|
||
await uploadImg(uploadParam).then(resu => {
|
||
resu = resu.data;
|
||
if (resu.returnCode==1) {
|
||
_this.faceImgs.push(base64);
|
||
_this.faceImgsId.push(resu.returnData+".jpg");
|
||
} else {
|
||
uni.hideLoading();
|
||
alertTip(resu.returnMsg);
|
||
return;
|
||
}
|
||
});
|
||
} else {
|
||
let groupBase =base64.slice((j-1)*glength,glength*j);
|
||
let uploadParam = {
|
||
base64: groupBase,
|
||
userId: getStorage('userInfo').userId+i,
|
||
groupEnd: '0'
|
||
}
|
||
await uploadImg(uploadParam).then(resu => {
|
||
resu = resu.data;
|
||
if (resu.returnCode ==1) {
|
||
|
||
} else {
|
||
uni.hideLoading();
|
||
alertTip(resu.returnMsg);
|
||
return;
|
||
}
|
||
});
|
||
}
|
||
}
|
||
uni.hideLoading();
|
||
}
|
||
}
|
||
});
|
||
},
|
||
});
|
||
}
|
||
}
|
||
});
|
||
},
|
||
fail: function(resp) {
|
||
console.log(resp.errMsg);
|
||
}
|
||
});
|
||
},
|
||
//办卡-删除人脸照片-第三方人员
|
||
removeFaceImg2(index) {
|
||
this.faceImgs.splice(index, 1);
|
||
this.faceImgsId.splice(index, 1);
|
||
},
|
||
//办卡-身份证照片-第三方人员-单人多张图片
|
||
async chooseIdCardImg2() {
|
||
let chec = 0;
|
||
let sty = [];
|
||
let _this = this;
|
||
uni.showActionSheet({
|
||
itemList: ['拍照', '相册'],
|
||
success: function(resp) {
|
||
chec = resp.tapIndex;
|
||
if (chec == 0) {
|
||
sty = ['camera']; //从相册相机选择
|
||
} else {
|
||
sty = ['album']; //从相册相机选择
|
||
}
|
||
uni.chooseImage({
|
||
count: 1,
|
||
sizeType: ['compressed'],
|
||
sourceType: sty,
|
||
quality: 1,
|
||
success: async function(res) {
|
||
let resData = res.tempFilePaths;
|
||
for (let i = 0; i < resData.length; i++) {
|
||
if (_this.idPhotoes.length > 1) {
|
||
break;
|
||
}
|
||
uni.getImageInfo({
|
||
src: resData[i],
|
||
success: async (path) => {
|
||
convertImgToBase64(path.path,async function(base64) {
|
||
if (_this.idPhotoes.length < 2) {
|
||
uni.showLoading({title: '图片上传中'})
|
||
let blength = base64.length;
|
||
let glength = 7500;
|
||
// console.log("base64:",base64)
|
||
if (blength <= glength) {
|
||
let uploadParam = {
|
||
base64: base64,
|
||
userId: getStorage('userInfo').userId + i,
|
||
groupEnd: '1'
|
||
}
|
||
await uploadImg(uploadParam).then(resu => {
|
||
resu = resu.data;
|
||
uni.hideLoading();
|
||
if (resu.returnCode !=1) {
|
||
alertTip(resu.returnMsg);
|
||
} else {
|
||
_this.idPhotoes.push(base64);
|
||
_this.idPhotoesId.push(resu.returnData + ".jpg");
|
||
}
|
||
});
|
||
} else {
|
||
let fnum = parseInt(blength / glength);
|
||
for (let j =1; j < fnum + 1; j++) {
|
||
if (j == fnum) {
|
||
let groupBase = base64.slice((j-1)*glength);
|
||
let uploadParam = {
|
||
base64: groupBase,
|
||
userId: getStorage('userInfo').userId +i,
|
||
groupEnd: '1'
|
||
}
|
||
await uploadImg(uploadParam).then(resu => {
|
||
resu = resu.data;
|
||
if (resu.returnCode==1) {
|
||
_this.idPhotoes.push(base64);
|
||
_this.idPhotoesId.push(resu.returnData+".jpg");
|
||
} else {
|
||
uni.hideLoading();
|
||
alertTip(resu.returnMsg);
|
||
return;
|
||
}
|
||
});
|
||
} else {
|
||
let groupBase =base64.slice((j-1)*glength,glength*j);
|
||
let uploadParam = {
|
||
base64: groupBase,
|
||
userId: getStorage('userInfo').userId+i,
|
||
groupEnd: '0'
|
||
}
|
||
await uploadImg(uploadParam).then(resu => {
|
||
resu = resu.data;
|
||
if (resu.returnCode ==1) {
|
||
|
||
} else {
|
||
uni.hideLoading();
|
||
alertTip(resu.returnMsg);
|
||
return;
|
||
}
|
||
});
|
||
}
|
||
}
|
||
uni.hideLoading();
|
||
}
|
||
}
|
||
});
|
||
},
|
||
});
|
||
}
|
||
}
|
||
});
|
||
},
|
||
fail: function(resp) {
|
||
console.log(resp.errMsg);
|
||
}
|
||
});
|
||
},
|
||
//办卡-删除身份证照片-第三方人员
|
||
removeIdCardImg2(index) {
|
||
this.idPhotoes.splice(index, 1);
|
||
this.idPhotoesId.splice(index, 1);
|
||
},
|
||
//办卡-情况说明照片-第三方人员-单人多张图片
|
||
async chooseSituationImg() {
|
||
let chec = 0;
|
||
let sty = [];
|
||
let _this = this;
|
||
uni.showActionSheet({
|
||
itemList: ['拍照', '相册'],
|
||
success: function(resp) {
|
||
chec = resp.tapIndex;
|
||
if (chec == 0) {
|
||
sty = ['camera']; //从相册相机选择
|
||
} else {
|
||
sty = ['album']; //从相册相机选择
|
||
}
|
||
uni.chooseImage({
|
||
count: 1,
|
||
sizeType: ['compressed'],
|
||
sourceType: sty,
|
||
quality: 1,
|
||
success: async function(res) {
|
||
let resData = res.tempFilePaths;
|
||
for (let i = 0; i < resData.length; i++) {
|
||
if (_this.situationPhotoes.length > 1) {
|
||
break;
|
||
}
|
||
uni.getImageInfo({
|
||
src: resData[i],
|
||
success: async (path) => {
|
||
convertImgToBase64(path.path,async function(base64) {
|
||
if (_this.situationPhotoes.length < 1) {
|
||
uni.showLoading({title: '图片上传中'})
|
||
let blength = base64.length;
|
||
let glength = 7500;
|
||
// console.log("base64:",base64)
|
||
if (blength <= glength) {
|
||
let uploadParam = {
|
||
base64: base64,
|
||
userId: getStorage('userInfo').userId + i,
|
||
groupEnd: '1'
|
||
}
|
||
await uploadImg(uploadParam).then(resu => {
|
||
resu = resu.data;
|
||
uni.hideLoading();
|
||
if (resu.returnCode !=1) {
|
||
alertTip(resu.returnMsg);
|
||
} else {
|
||
_this.situationPhotoes.push(base64);
|
||
_this.situationPhotoesId.push(resu.returnData + ".jpg");
|
||
}
|
||
});
|
||
} else {
|
||
let fnum = parseInt(blength / glength);
|
||
for (let j =1; j < fnum + 1; j++) {
|
||
if (j == fnum) {
|
||
let groupBase = base64.slice((j-1)*glength);
|
||
let uploadParam = {
|
||
base64: groupBase,
|
||
userId: getStorage('userInfo').userId +i,
|
||
groupEnd: '1'
|
||
}
|
||
await uploadImg(uploadParam).then(resu => {
|
||
resu = resu.data;
|
||
if (resu.returnCode==1) {
|
||
_this.situationPhotoes.push(base64);
|
||
_this.situationPhotoesId.push(resu.returnData+".jpg");
|
||
} else {
|
||
uni.hideLoading();
|
||
alertTip(resu.returnMsg);
|
||
return;
|
||
}
|
||
});
|
||
} else {
|
||
let groupBase =base64.slice((j-1)*glength,glength*j);
|
||
let uploadParam = {
|
||
base64: groupBase,
|
||
userId: getStorage('userInfo').userId+i,
|
||
groupEnd: '0'
|
||
}
|
||
await uploadImg(uploadParam).then(resu => {
|
||
resu = resu.data;
|
||
if (resu.returnCode ==1) {
|
||
|
||
} else {
|
||
uni.hideLoading();
|
||
alertTip(resu.returnMsg);
|
||
return;
|
||
}
|
||
});
|
||
}
|
||
}
|
||
uni.hideLoading();
|
||
}
|
||
}
|
||
});
|
||
},
|
||
});
|
||
}
|
||
}
|
||
});
|
||
},
|
||
fail: function(resp) {
|
||
console.log(resp.errMsg);
|
||
}
|
||
});
|
||
},
|
||
//办卡-删除情况说明照片-第三方人员
|
||
removeSituationImg(index) {
|
||
this.situationPhotoes.splice(index, 1);
|
||
this.situationPhotoesId.splice(index, 1);
|
||
},
|
||
//办卡-附件照片-VIP贵宾
|
||
async chooseDocumentImg() {
|
||
let chec = 0;
|
||
let sty = [];
|
||
let _this = this;
|
||
uni.showActionSheet({
|
||
itemList: ['拍照', '相册'],
|
||
success: function(resp) {
|
||
chec = resp.tapIndex;
|
||
if (chec == 0) {
|
||
sty = ['camera']; //从相册相机选择
|
||
} else {
|
||
sty = ['album']; //从相册相机选择
|
||
}
|
||
uni.chooseImage({
|
||
count: 1,
|
||
sizeType: ['compressed'],
|
||
sourceType: sty,
|
||
quality: 1,
|
||
success: async function(res) {
|
||
let resData = res.tempFilePaths;
|
||
for (let i = 0; i < resData.length; i++) {
|
||
if (_this.documentPhoto.length > 1) {
|
||
break;
|
||
}
|
||
uni.getImageInfo({
|
||
src: resData[i],
|
||
success: async (path) => {
|
||
convertImgToBase64(path.path,
|
||
async function(base64) {
|
||
if (_this.documentPhoto.length < 1) {
|
||
uni.showLoading({
|
||
title: '图片上传中'
|
||
})
|
||
let blength = base64.length;
|
||
let glength = 7500;
|
||
// console.log("base64:",base64)
|
||
if (blength <=
|
||
glength) {
|
||
let uploadParam = {
|
||
base64: base64,
|
||
userId: getStorage('userInfo').userId +i,
|
||
groupEnd: '1'
|
||
}
|
||
await uploadImg(uploadParam)
|
||
.then(
|
||
resu => {
|
||
resu =resu.data;
|
||
uni.hideLoading();
|
||
if (resu.returnCode !=1) {
|
||
alertTip(resu.returnMsg);
|
||
} else {
|
||
_this.documentPhoto.push(base64);
|
||
_this.documentPhotoId.push(resu.returnData +".jpg");
|
||
}
|
||
});
|
||
} else {
|
||
let fnum =parseInt(blength /glength);
|
||
for (let j =1; j <fnum +1; j++) {
|
||
if (j ==fnum) {
|
||
let groupBase =base64.slice((j -1) *glength);
|
||
console.log(groupBase.length,"groupBaselength");
|
||
let uploadParam = {
|
||
base64: groupBase,
|
||
userId: getStorage(
|
||
'userInfo'
|
||
)
|
||
.userId +
|
||
i,
|
||
groupEnd: '1'
|
||
}
|
||
await uploadImg
|
||
(
|
||
uploadParam)
|
||
.then(
|
||
resu => {
|
||
resu =
|
||
resu
|
||
.data;
|
||
if (resu
|
||
.returnCode ==
|
||
1
|
||
) {
|
||
_this
|
||
.documentPhoto
|
||
.push(
|
||
base64
|
||
);
|
||
_this
|
||
.documentPhotoId
|
||
.push(
|
||
resu
|
||
.returnData +
|
||
".jpg"
|
||
);
|
||
} else {
|
||
uni
|
||
.hideLoading();
|
||
alertTip
|
||
(resu
|
||
.returnMsg
|
||
);
|
||
return;
|
||
}
|
||
}
|
||
);
|
||
} else {
|
||
let groupBase =
|
||
base64
|
||
.slice(
|
||
(j -
|
||
1) *
|
||
glength,
|
||
glength *
|
||
j
|
||
);
|
||
let uploadParam = {
|
||
base64: groupBase,
|
||
userId: getStorage(
|
||
'userInfo'
|
||
)
|
||
.userId +
|
||
i,
|
||
groupEnd: '0'
|
||
}
|
||
await uploadImg
|
||
(
|
||
uploadParam)
|
||
.then(
|
||
resu => {
|
||
resu =
|
||
resu
|
||
.data;
|
||
if (resu
|
||
.returnCode ==
|
||
1
|
||
) {} else {
|
||
uni
|
||
.hideLoading();
|
||
alertTip
|
||
(resu
|
||
.returnMsg
|
||
);
|
||
return;
|
||
}
|
||
}
|
||
);
|
||
}
|
||
}
|
||
uni
|
||
.hideLoading();
|
||
}
|
||
}
|
||
});
|
||
},
|
||
});
|
||
}
|
||
}
|
||
});
|
||
},
|
||
fail: function(resp) {
|
||
console.log(resp.errMsg);
|
||
}
|
||
});
|
||
},
|
||
//办卡-删除附件文件-VIP贵宾
|
||
removeDocumentImg(index) {
|
||
this.documentPhoto.splice(index, 1);
|
||
this.documentPhotoId.splice(index, 1);
|
||
},
|
||
//办证-临时出入证
|
||
//办卡-人脸照片-临时出入证-多人多张图片
|
||
async chooseFaceImg3(peopleIndex) {
|
||
let chec = 0;
|
||
let sty = [];
|
||
let _this = this;
|
||
uni.showActionSheet({
|
||
itemList: ['拍照', '相册'],
|
||
success: function(resp) {
|
||
chec = resp.tapIndex;
|
||
if (chec == 0) {
|
||
sty = ['camera']; //从相册相机选择
|
||
} else {
|
||
sty = ['album']; //从相册相机选择
|
||
}
|
||
uni.chooseImage({
|
||
count: 1,
|
||
sizeType: ['compressed'],
|
||
sourceType: sty,
|
||
quality: 1,
|
||
success: async function(res) {
|
||
let resData = res.tempFilePaths;
|
||
for (let i = 0; i < resData.length; i++) {
|
||
if (_this.peopleList1[peopleIndex].faceImgs.length > 1) {
|
||
break;
|
||
}
|
||
uni.getImageInfo({
|
||
src: resData[i],
|
||
success: async (path) => {
|
||
convertImgToBase64(path.path,async function(base64) {
|
||
if (_this.peopleList1[peopleIndex].faceImgs.length < 1) {
|
||
uni.showLoading({title: '图片上传中'})
|
||
let blength = base64.length;
|
||
let glength = 7500;
|
||
// console.log("base64:",base64)
|
||
if (blength <= glength) {
|
||
let uploadParam = {
|
||
base64: base64,
|
||
userId: getStorage('userInfo').userId + i,
|
||
groupEnd: '1'
|
||
}
|
||
await uploadImg(uploadParam).then(resu => {
|
||
resu = resu.data;
|
||
uni.hideLoading();
|
||
if (resu.returnCode !=1) {
|
||
alertTip(resu.returnMsg);
|
||
} else {
|
||
_this.peopleList1[peopleIndex].faceImgs.push(base64);
|
||
_this.peopleList1[peopleIndex].faceImgsId.push(resu.returnData + ".jpg");
|
||
}
|
||
});
|
||
} else {
|
||
let fnum = parseInt(blength / glength);
|
||
for (let j =1; j < fnum + 1; j++) {
|
||
if (j == fnum) {
|
||
let groupBase = base64.slice((j-1)*glength);
|
||
let uploadParam = {
|
||
base64: groupBase,
|
||
userId: getStorage('userInfo').userId +i,
|
||
groupEnd: '1'
|
||
}
|
||
await uploadImg(uploadParam).then(resu => {
|
||
resu = resu.data;
|
||
if (resu.returnCode==1) {
|
||
_this.peopleList1[peopleIndex].faceImgs.push(base64);
|
||
_this.peopleList1[peopleIndex].faceImgsId.push(resu.returnData+".jpg");
|
||
} else {
|
||
uni.hideLoading();
|
||
alertTip(resu.returnMsg);
|
||
return;
|
||
}
|
||
});
|
||
} else {
|
||
let groupBase =base64.slice((j-1)*glength,glength*j);
|
||
let uploadParam = {
|
||
base64: groupBase,
|
||
userId: getStorage('userInfo').userId+i,
|
||
groupEnd: '0'
|
||
}
|
||
await uploadImg(uploadParam).then(resu => {
|
||
resu = resu.data;
|
||
if (resu.returnCode ==1) {
|
||
|
||
} else {
|
||
uni.hideLoading();
|
||
alertTip(resu.returnMsg);
|
||
return;
|
||
}
|
||
});
|
||
}
|
||
}
|
||
uni.hideLoading();
|
||
}
|
||
}
|
||
});
|
||
},
|
||
});
|
||
}
|
||
}
|
||
});
|
||
},
|
||
fail: function(resp) {
|
||
console.log(resp.errMsg);
|
||
}
|
||
});
|
||
},
|
||
//删除人脸照片-临时出入证
|
||
removeFaceImg3(peopleIndex,index) {
|
||
this.peopleList1[peopleIndex].faceImgs.splice(index, 1);
|
||
this.peopleList1[peopleIndex].faceImgsId.splice(index, 1);
|
||
},
|
||
//办证-临时出入证
|
||
//办卡-人脸照片-临时出入证-多人多张图片
|
||
async chooseFaceImg4(peopleIndex) {
|
||
let chec = 0;
|
||
let sty = [];
|
||
let _this = this;
|
||
uni.showActionSheet({
|
||
itemList: ['拍照', '相册'],
|
||
success: function(resp) {
|
||
chec = resp.tapIndex;
|
||
if (chec == 0) {
|
||
sty = ['camera']; //从相册相机选择
|
||
} else {
|
||
sty = ['album']; //从相册相机选择
|
||
}
|
||
uni.chooseImage({
|
||
count: 1,
|
||
sizeType: ['compressed'],
|
||
sourceType: sty,
|
||
quality: 1,
|
||
success: async function(res) {
|
||
let resData = res.tempFilePaths;
|
||
for (let i = 0; i < resData.length; i++) {
|
||
if (_this.peopleList2[peopleIndex].faceImgs.length > 1) {
|
||
break;
|
||
}
|
||
uni.getImageInfo({
|
||
src: resData[i],
|
||
success: async (path) => {
|
||
convertImgToBase64(path.path,async function(base64) {
|
||
if (_this.peopleList2[peopleIndex].faceImgs.length < 1) {
|
||
uni.showLoading({title: '图片上传中'})
|
||
let blength = base64.length;
|
||
let glength = 7500;
|
||
// console.log("base64:",base64)
|
||
if (blength <= glength) {
|
||
let uploadParam = {
|
||
base64: base64,
|
||
userId: getStorage('userInfo').userId + i,
|
||
groupEnd: '1'
|
||
}
|
||
await uploadImg(uploadParam).then(resu => {
|
||
resu = resu.data;
|
||
uni.hideLoading();
|
||
if (resu.returnCode !=1) {
|
||
alertTip(resu.returnMsg);
|
||
} else {
|
||
_this.peopleList2[peopleIndex].faceImgs.push(base64);
|
||
_this.peopleList2[peopleIndex].faceImgsId.push(resu.returnData + ".jpg");
|
||
}
|
||
});
|
||
} else {
|
||
let fnum = parseInt(blength / glength);
|
||
for (let j =1; j < fnum + 1; j++) {
|
||
if (j == fnum) {
|
||
let groupBase = base64.slice((j-1)*glength);
|
||
let uploadParam = {
|
||
base64: groupBase,
|
||
userId: getStorage('userInfo').userId +i,
|
||
groupEnd: '1'
|
||
}
|
||
await uploadImg(uploadParam).then(resu => {
|
||
resu = resu.data;
|
||
if (resu.returnCode==1) {
|
||
_this.peopleList2[peopleIndex].faceImgs.push(base64);
|
||
_this.peopleList2[peopleIndex].faceImgsId.push(resu.returnData+".jpg");
|
||
} else {
|
||
uni.hideLoading();
|
||
alertTip(resu.returnMsg);
|
||
return;
|
||
}
|
||
});
|
||
} else {
|
||
let groupBase =base64.slice((j-1)*glength,glength*j);
|
||
let uploadParam = {
|
||
base64: groupBase,
|
||
userId: getStorage('userInfo').userId+i,
|
||
groupEnd: '0'
|
||
}
|
||
await uploadImg(uploadParam).then(resu => {
|
||
resu = resu.data;
|
||
if (resu.returnCode ==1) {
|
||
|
||
} else {
|
||
uni.hideLoading();
|
||
alertTip(resu.returnMsg);
|
||
return;
|
||
}
|
||
});
|
||
}
|
||
}
|
||
uni.hideLoading();
|
||
}
|
||
}
|
||
});
|
||
},
|
||
});
|
||
}
|
||
}
|
||
});
|
||
},
|
||
fail: function(resp) {
|
||
console.log(resp.errMsg);
|
||
}
|
||
});
|
||
},
|
||
//删除人脸照片-临时出入证
|
||
removeFaceImg4(peopleIndex,index) {
|
||
this.peopleList2[peopleIndex].faceImgs.splice(index, 1);
|
||
this.peopleList2[peopleIndex].faceImgsId.splice(index, 1);
|
||
},
|
||
//补办挂失
|
||
//获取所有卡
|
||
getAllCardList() {
|
||
let params = {
|
||
method: getAllCardList,
|
||
data: {
|
||
userId: getStorage('userInfo').userId,
|
||
phone: getStorage('userInfo').mobile,
|
||
}
|
||
};
|
||
callbackRequest(params).then(res => {
|
||
console.log("获取所有卡",res);
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
console.log(res);
|
||
this.myCardList = res.returnData;
|
||
// this.lossCardList = []
|
||
// this.myCardList.forEach(item=>{
|
||
// if(item.status==null){
|
||
// this.lossCardList.push(item)
|
||
// }
|
||
// })
|
||
// this.lossItem = this.lossCardList[0]
|
||
// console.log(this.lossCardList)
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
getReissueCardList() {
|
||
let params = {
|
||
method: getReissueCardList,
|
||
data: {
|
||
userId: getStorage('userInfo').userId
|
||
}
|
||
};
|
||
callbackRequest(params).then(res => {
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
console.log(res);
|
||
this.reissueCardList = res.returnData;
|
||
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
//卡挂失
|
||
//打开确认框
|
||
circulation(item){
|
||
this.losscard = {};
|
||
this.losscard = item;
|
||
this.$refs.popup.open();
|
||
},
|
||
//关闭确认框
|
||
closeCirculation(){
|
||
this.losscard = {};
|
||
this.$refs.popup.close()
|
||
},
|
||
//确认挂失
|
||
handleCard(){
|
||
let params = {
|
||
method: addMyCard,
|
||
data: {
|
||
userId:getStorage('userInfo').userId,
|
||
type:"3",
|
||
cardId:this.losscard.id,
|
||
}
|
||
};
|
||
callbackRequest(params).then(res => {
|
||
console.log("确认挂失",res);
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
alertTip(res.returnMsg);
|
||
this.closeCirculation()
|
||
this.getAllCardList();
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
//卡解绑
|
||
//打开确认框
|
||
unbindCard(item){
|
||
this.unbind = item;
|
||
this.$refs.popup2.open();
|
||
},
|
||
//关闭确认框
|
||
closeCirculation2(){
|
||
this.unbind = {};
|
||
this.$refs.popup2.close()
|
||
},
|
||
//确认解绑
|
||
handleCard2(){
|
||
console.log(this.unbind)
|
||
let params = {
|
||
method: addMyCard,
|
||
data: {
|
||
userId:getStorage('userInfo').userId,
|
||
type:"2",
|
||
cardId:this.unbind.id
|
||
}
|
||
};
|
||
callbackRequest(params).then(res => {
|
||
console.log("确认解绑",res);
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
alertTip(res.returnMsg);
|
||
this.closeCirculation2()
|
||
this.getAllCardList();
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
//卡绑定
|
||
//打开确认框
|
||
openCardBand(){
|
||
this.cardBand = {cardNo:""};
|
||
this.$refs.bandPopup.open();
|
||
},
|
||
//关闭确认框
|
||
closecardBand(){
|
||
this.cardBand = {cardNo:""};
|
||
this.$refs.bandPopup.close()
|
||
},
|
||
//确认绑定
|
||
handleCardBand(){
|
||
let params = {
|
||
method: addMyCard,
|
||
data: {
|
||
userId:getStorage('userInfo').userId,
|
||
type:"1",
|
||
cardNo:this.cardBand.cardNo
|
||
}
|
||
};
|
||
callbackRequest(params).then(res => {
|
||
console.log("确认绑定",res);
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
alertTip(res.returnMsg);
|
||
this.closecardBand()
|
||
this.getAllCardList();
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
//卡补办
|
||
//打开确认框
|
||
reissueCardOpen(item){
|
||
this.reissueCardData = item;
|
||
this.$refs.popup3.open();
|
||
},
|
||
//关闭确认框
|
||
closeReissueCard(){
|
||
this.reissueCardData = {};
|
||
this.$refs.popup3.close()
|
||
},
|
||
//确认补办
|
||
handleReissueCard(){
|
||
console.log(this.reissueCardData)
|
||
let params = {
|
||
method: addMyCard,
|
||
data: {
|
||
userId:getStorage('userInfo').userId,
|
||
userName:getStorage('userInfo').username,
|
||
phone:getStorage('userInfo').mobile,
|
||
orgId:getStorage('userInfo').orgId,
|
||
orgName:getStorage('userInfo').orgName,
|
||
type:"4",
|
||
cardId:this.reissueCardData.id
|
||
}
|
||
};
|
||
console.log(params)
|
||
callbackRequest(params).then(res => {
|
||
console.log("确认补办",res);
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
alertTip(res.returnMsg);
|
||
this.closeReissueCard()
|
||
this.getReissueCardList();
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
//卡解绑
|
||
//打开确认框
|
||
delCardOpen(item){
|
||
this.delCardData = item;
|
||
this.$refs.popup4.open();
|
||
},
|
||
//关闭确认框
|
||
closeDelCard(){
|
||
this.delCardData = {};
|
||
this.$refs.popup4.close()
|
||
},
|
||
//确认删除
|
||
handleDelCard(){
|
||
console.log(this.delCardData)
|
||
let params = {
|
||
method: addMyCard,
|
||
data: {
|
||
userId:getStorage('userInfo').userId,
|
||
userName:getStorage('userInfo').username,
|
||
phone:getStorage('userInfo').mobile,
|
||
orgId:getStorage('userInfo').orgId,
|
||
orgName:getStorage('userInfo').orgName,
|
||
type:"5",
|
||
cardId:this.delCardData.id
|
||
}
|
||
};
|
||
console.log(params)
|
||
callbackRequest(params).then(res => {
|
||
console.log("确认删除",res);
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
alertTip(res.returnMsg);
|
||
this.closeDelCard()
|
||
this.getAllCardList();
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
//获取申请列表
|
||
dataList() {
|
||
let params = {
|
||
method: getCardList,
|
||
data: {
|
||
userId: this.userInfo.id,
|
||
phone: this.userInfo.telnumber,
|
||
pageNum: this.page,
|
||
pageSize: this.pageSize
|
||
}
|
||
};
|
||
callbackRequest(params).then(res => {
|
||
console.log("获取申请列表",res);
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
if (this.page == 1) {
|
||
this.cardList = res.returnData || [];
|
||
} else {
|
||
if (res.returnData.length > 0) {
|
||
this.cardList = this.cardList.concat(res.returnData);
|
||
this.loadingType = 0;
|
||
} else {
|
||
this.loadingType = 2;
|
||
}
|
||
}
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
// 跳转详情
|
||
details: function(item) {
|
||
uni.navigateTo({
|
||
url: '/pages/access-card/access-card-detail?id=' + item.ID + '&item=' + JSON.stringify(
|
||
item)
|
||
});
|
||
},
|
||
//跳转选择出入区域
|
||
goSelectArea: function(type) {
|
||
uni.navigateTo({
|
||
url: '/pages/access-card/access-area?chosenType=' + type
|
||
});
|
||
},
|
||
},
|
||
onReachBottom() {
|
||
if (this.loadingType !== 0 || this.currentTabIndex == 0) {
|
||
return;
|
||
}
|
||
this.loadingType = 1;
|
||
this.page = this.page + 1;
|
||
this.dataList();
|
||
},
|
||
};
|
||
</script>
|
||
|
||
<style lang="scss">
|
||
@import url('../../static/css/repair/malfunction-repair.css');
|
||
@import '@/static/css/common.scss';
|
||
|
||
.radioBox{
|
||
height: 280upx;
|
||
}
|
||
.chosenCard{
|
||
background-color: #8DDDC5 !important;
|
||
}
|
||
|
||
.nolist {
|
||
font-size: 30upx;
|
||
color: #797979;
|
||
text-align: center;
|
||
margin-top: 20upx;
|
||
}
|
||
.main {
|
||
margin: 180upx 40upx 0;
|
||
position: relative;
|
||
z-index: 10;
|
||
|
||
.tab-box {
|
||
overflow: hidden;
|
||
// border-radius: 10upx 10upx 0 0;
|
||
// background: rgba(132, 149, 167, 0.8);
|
||
height: 80upx;
|
||
|
||
.tab-item {
|
||
float: left;
|
||
height: 70upx;
|
||
width: 40%;
|
||
font-size: 30upx;
|
||
// color: #e5f6ff;
|
||
// text-align: center;
|
||
line-height: 70upx;
|
||
}
|
||
|
||
.active {
|
||
// background: #fff;
|
||
color: #333;
|
||
border-radius: 10upx 10upx 0 0;
|
||
font-weight: bold;
|
||
|
||
}
|
||
.activeLine{
|
||
background: linear-gradient( 90deg, #50CBA1 0%, #06AEA6 100%), #5685F2;
|
||
border-radius: 10upx;
|
||
width: 80upx;
|
||
height: 10upx;
|
||
}
|
||
}
|
||
}
|
||
|
||
|
||
.list-content {
|
||
font-size: 28upx;
|
||
margin: 0 25upx;
|
||
margin-top: 20upx;
|
||
.details {
|
||
background: white;
|
||
padding: 0 20upx 20upx;
|
||
border-radius: 18upx;
|
||
margin-bottom: 20upx;
|
||
|
||
.detail_header {
|
||
border-bottom: #f8f8f8 5upx solid;
|
||
height: 100upx;
|
||
line-height: 100upx;
|
||
// margin: 0;
|
||
// border-radius: 10upx;
|
||
|
||
.blueSign {
|
||
height: 28upx;
|
||
width: 5upx;
|
||
background: #00c277;
|
||
display: inline-block;
|
||
margin-left: 20upx;
|
||
vertical-align: middle;
|
||
}
|
||
|
||
.font-tilte {
|
||
font-size: 32upx;
|
||
font-weight: bold;
|
||
margin-left: 20upx;
|
||
vertical-align: middle;
|
||
}
|
||
}
|
||
|
||
.detail_msg {
|
||
margin-left: 20upx;
|
||
border-radius: 10upx;
|
||
overflow: hidden;
|
||
|
||
view {
|
||
height: 60upx;
|
||
line-height: 60upx;
|
||
}
|
||
|
||
.status {
|
||
position: absolute;
|
||
color: red;
|
||
margin-left: 580upx;
|
||
margin-top: -15upx;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
.statusgr {
|
||
float: right;
|
||
margin-right: 30upx;
|
||
color: #00c277;
|
||
}
|
||
|
||
.statusred {
|
||
width: 160upx;
|
||
height: 60upx;
|
||
line-height: 60upx;
|
||
text-align: center;
|
||
border-radius: 50upx;
|
||
float: right;
|
||
font-size: 26upx;
|
||
margin-right: 30upx;
|
||
margin-top: 25upx;
|
||
}
|
||
|
||
.img-box {
|
||
overflow: hidden;
|
||
padding-top: 20rpx;
|
||
padding-bottom: 10rpx;
|
||
|
||
.img-item {
|
||
float: left;
|
||
width: 200upx;
|
||
height: 200upx;
|
||
border: 1px solid #ddd;
|
||
margin: 0 22rpx 20upx 0upx;
|
||
position: relative;
|
||
box-sizing: border-box;
|
||
|
||
.img {
|
||
display: block;
|
||
width: 100%;
|
||
height: 100%;
|
||
}
|
||
|
||
.remove-btn {
|
||
position: absolute;
|
||
top: -18upx;
|
||
right: -18upx;
|
||
width: 44upx;
|
||
height: 44upx;
|
||
z-index: 2;
|
||
}
|
||
}
|
||
|
||
.upload-btn {
|
||
.img {
|
||
width: 60upx;
|
||
height: 60upx;
|
||
margin: unset;
|
||
}
|
||
}
|
||
}
|
||
|
||
.detail_msg .info-item {
|
||
font-size: 28upx;
|
||
margin-right: 30upx;
|
||
text {
|
||
display: inline-block;
|
||
width: 140upx;
|
||
color: #999;
|
||
}
|
||
|
||
.infoSpan {
|
||
width: auto;
|
||
font-size: 28upx;
|
||
color: #999;
|
||
float: right;
|
||
}
|
||
}
|
||
.input-box {
|
||
margin-left:40upx;
|
||
|
||
input {
|
||
width: 100%;
|
||
height: 50upx;
|
||
line-height: 50upx;
|
||
font-size: 26upx;
|
||
color: #666;
|
||
}
|
||
}
|
||
.form-box {
|
||
background: #fff;
|
||
|
||
.form-item {
|
||
overflow: hidden;
|
||
border-bottom: 1px solid #eee;
|
||
padding: 30upx 20upx;
|
||
|
||
|
||
.label {
|
||
float: left;
|
||
width: 140upx;
|
||
font-size: 28upx;
|
||
color: #333;
|
||
font-weight: bold;
|
||
line-height: 50upx;
|
||
}
|
||
|
||
.ipt-box {
|
||
margin-left: 150upx;
|
||
.areaBtn{
|
||
font-size: 24upx;
|
||
width: 100upx;
|
||
height: 60upx;
|
||
line-height: 65upx;
|
||
text-align: center;
|
||
background: linear-gradient( 90deg, #50CBA1 0%, #06AEA6 100%), #C1EFEA;
|
||
border-radius: 15upx;
|
||
color: #fff;
|
||
margin-right: 20upx;
|
||
}
|
||
input {
|
||
width: 100%;
|
||
height: 50upx;
|
||
line-height: 50upx;
|
||
font-size: 26upx;
|
||
color: #666;
|
||
}
|
||
}
|
||
|
||
.select {
|
||
.arrow {
|
||
float: right;
|
||
width: 16upx;
|
||
height: 29upx;
|
||
margin-top: 10upx;
|
||
}
|
||
|
||
.picker {
|
||
height: 50upx;
|
||
line-height: 50upx;
|
||
font-size: 26upx;
|
||
color: #666;
|
||
margin-left: 10upx;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
.card-box{
|
||
background: #fff;
|
||
padding: 40upx;
|
||
.card-item{
|
||
margin-bottom: 20upx;
|
||
padding: 20upx;
|
||
width: 100%;
|
||
// height: 180upx;
|
||
border-radius: 10upx;
|
||
background-color: #6CD374;
|
||
position: relative;
|
||
color: #fff;
|
||
.card-btn{
|
||
// position: absolute;
|
||
// bottom: 40upx;
|
||
// right: 20upx;
|
||
background-color: #C2FAF8;
|
||
padding: 8rpx 20rpx;
|
||
border-radius: 10rpx;
|
||
margin-right: 20rpx;
|
||
color: #666;
|
||
}
|
||
// .card-btn0{
|
||
// position: absolute;
|
||
// bottom: 40upx;
|
||
// right: 150upx;
|
||
// background-color: #C2FAF8;
|
||
// padding: 5upx 20upx;
|
||
// border-radius: 10upx;
|
||
// }
|
||
}
|
||
}
|
||
|
||
.comment-btn {
|
||
float: right;
|
||
font-size: 24upx;
|
||
border-radius: 10upx;
|
||
color: #fff;
|
||
// line-height: 30upx;
|
||
text-align: center;
|
||
min-width: 120upx;
|
||
margin-right: 30upx;
|
||
background-color: #00c277;
|
||
}
|
||
|
||
.common-shade {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100vh;
|
||
background: rgba(0, 0, 0, 0.7);
|
||
z-index: 99;
|
||
}
|
||
|
||
.box {
|
||
display: flex;
|
||
display: -webkit-flex;
|
||
}
|
||
|
||
.box-row-reverse {
|
||
flex-direction: row;
|
||
}
|
||
|
||
/*上下排列*/
|
||
.box-column {
|
||
flex-direction: column;
|
||
}
|
||
|
||
/*上下排列*/
|
||
.box-left {
|
||
justify-content: flex-start;
|
||
}
|
||
|
||
/*居右*/
|
||
.box-right {
|
||
justify-content: flex-end;
|
||
}
|
||
|
||
/*居左*/
|
||
.box-center {
|
||
justify-content: center;
|
||
}
|
||
|
||
/*居中*/
|
||
.box-between {
|
||
justify-content: space-between;
|
||
}
|
||
|
||
/*两端对齐*/
|
||
.box-align-center {
|
||
align-items: center;
|
||
}
|
||
|
||
.box-wrap {
|
||
flex-wrap: wrap;
|
||
}
|
||
</style> |