hldy_xcx/pages/oldmanindex/all.vue

579 lines
15 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="container">
<!-- <u-modal v-model="show" :content="content"></u-modal> -->
<model :show="show" @close="show=false" :content="content" />
<!-- <image class="greenbgc" src="https://www.focusnu.com/media/directive/index/greenbgc.png" /> -->
<view class="title-back" :style="{height:`${uni.getStorageSync('moveHeight')+40}px`}">
<view class="left-father" @click="goBack">
<image class="back-img" src="https://www.focusnu.com/media/directive/index/left.png" />
<view style="font-size: 30rpx;">{{targetpage==0?"监护人信息":'长者信息'}}</view>
</view>
</view>
<view :style="{height:`${uni.getStorageSync('moveHeight') + 30}px`}"></view>
<view class="shzt" v-if="alldata.modifyStatus==3||alldata.modifyStatus==5">
<view class="icoi">i</view>
<text style="color: rgba(102, 102, 102, 1); width: 70%;word-break: break-all;">
驳回原因{{alldata.auditContent}}
</text>
<text style=" color:rgba(237, 72, 69, 1);white-space: nowrap;">审核驳回</text>
</view>
<view class="white-content" v-show="!targetpage">
<view class="content-title" style="margin: 20rpx 0;justify-content: space-between;">
<view style="display: flex;">
<view class="shu"></view>
<view class="content-weight" style="margin-top: -2rpx;">监护人信息</view>
<image class="shu-img" :style="alldata.modifyStatus==3?{top:`40%`}:{}"
:src="alldata.modifyStatus? `https://www.focusnu.com/media/directive/index/${statusarray[alldata.modifyStatus-1]}.png`:``" />
</view>
</view>
<!-- <image class="shu-img"
:src="alldata.modifyStatus? `https://www.focusnu.com/media/directive/index/${statusarray[alldata.modifyStatus-1]}.png`:``" /> -->
<view class="white-photo" @click="getMessage(headImge1)">
<view class="photo-left">
<view class="photo-weight">人像面</view>
<!-- <view class="photo-font">请上传营业执照</view> -->
</view>
<view style="position: relative;">
<image class="photo"
:src="headImge1 ? headImge1 : `https://www.focusnu.com/media/directive/index/zhizhao.png`" />
<image v-if="!headImge1"
style="position: absolute;top: 50%;left: 50%;width: 70rpx;height: 60rpx;transform: translate(-50%,-50%);"
src="https://www.focusnu.com/media/directive/index/takephoto.png" />
</view>
</view>
<view class="white-message">
<view>
<view v-for="(item,index) in nameArray1" :key="index" class="one"
@click="openLook(textArray1[index])">
<view class="one-left">{{item}}</view>
<view class="one-right">{{textArray1[index] ? textArray1[index] : "无" }}</view>
</view>
</view>
</view>
</view>
<view style="display: flex;width: 100%;padding: 0 10%;justify-content: center;" v-if="!targetpage">
<!-- <view class="back-button" @click="dexcard = 0">
上一步
</view> -->
<!-- <view class="finish-button" @click="targetpage = 1">
下一步
</view> -->
</view>
<view class="white-content" v-show="targetpage">
<view class="content-title" style="margin: 20rpx 0;justify-content: space-between;">
<view style="display: flex;">
<view class="shu"></view>
<view class="content-weight" style="margin-top: -2rpx;">长者信息</view>
</view>
</view>
</view>
<view class="white-content" v-show="targetpage">
<view class="white-photo" @click="getMessage(`${media_base_url}${specialImge}`)">
<view class="photo-left">
<view class="photo-weight">人像面</view>
<!-- <view class="photo-font">请上传身份证人像面</view> -->
</view>
<view style="position: relative;">
<image class="photo"
:src="specialImge ? `${media_base_url}${specialImge}` : `https://www.focusnu.com/media/directive/index/IDcard.png`" />
<image v-if="!specialImge"
style="position: absolute;top: 50%;left: 50%;width: 70rpx;height: 60rpx;transform: translate(-50%,-50%);"
src="https://www.focusnu.com/media/directive/index/takephoto.png" />
</view>
</view>
<view class="white-photo" style="margin-top: 30rpx;" @click="getMessage(`${media_base_url}${endphoto}`)">
<view class="photo-left">
<view class="photo-weight">国徽面</view>
<!-- <view class="photo-font">请上传身份证国徽面</view> -->
</view>
<view style="position: relative;">
<image class="photo"
:src="endphoto ? `${media_base_url}${endphoto}` : `https://www.focusnu.com/media/directive/index/backIDcard.png`" />
<image v-if="!endphoto"
style="position: absolute;top: 50%;left: 50%;width: 70rpx;height: 60rpx;transform: translate(-50%,-50%);"
src="https://www.focusnu.com/media/directive/index/takephoto.png" />
</view>
</view>
<!-- <view class="content-title" style="margin: 20rpx 0;">
<view class="shu"></view>
<view class="content-weight">确认身份证信息</view>
</view> -->
<view class="white-message">
<view>
<view v-for="(item,index) in nameArray" :key="index" class="one"
@click="openLook(textArray[index])">
<view class="one-left">{{item}}</view>
<view class="one-right">{{textArray[index] ? textArray[index] : "无" }}</view>
</view>
</view>
</view>
</view>
<!-- <view style="display: flex;width: 100%;padding: 0 10%;justify-content: space-between;" v-if="targetpage">
<view class="back-button" @click="targetpage = 0">
上一步
</view>
<view class="finish-button" @click="goBack">
关闭
</view>
</view> -->
<view style="display: flex;width: 100%;margin-top: 40rpx;"></view>
</div>
</template>
<script setup>
import {
ref,
reactive
} from 'vue'
import {
onLoad
} from '@dcloudio/uni-app';
import {
media_base_url
} from '@/request/index.js';
import {
getrel,
getManyDictItems
} from '@/pages/addjigou/api/addjigou.js';
import model from "@/compontent/public/model.vue"
import {
swapLongTerm
} from '@/compontent/public/long.js'
const show = ref(false);
const content = ref("");
const targetpage = ref(0)
const statusarray = ["loading", "success", "fail"]
const nameArray = ["姓名", "性别", "身份证号码", "民族", "出生日期", "住址", "签发机关", "有效期限", "医保类型", "失能等级"];
const textArray = reactive(["", "", "", "", "", "", "", "", "", ""]);
const headImge = ref("");
const headImge0 = ref("");
const headImge1 = ref("");
const fontphoto0 = ref("")
const endphoto0 = ref("")
const imgArray = ref(["", "", "", ""])
const nameArray0 = ["开户行", "开户行卡号"];
const textArray0 = reactive(["", "", ]);
const nameArray1 = [ "姓名", "电话", "身份证号码", "家庭住址", "工作单位"];
const textArray1 = reactive(["", "", "", "", "", "", "", "", "", ""]);
const backImge = ref("");
const states = ["待提交", "审核中", "审核通过", "审核未通过"];
const fontphoto = ref("");
const endphoto = ref("");
const statesTarget = ref(0);
// 本地保存的临时文件路径
const tempImagePath = ref('')
// 拍照并上传
function getMessage(url) {
if (!url) {
return
}
uni.previewImage({
current: url, // 当前显示图片的链接
urls: [url], // 可以预览的图片列表
indicator: 'default', // 显示面板指示点,'default'|'number'|'none'
loop: true, // 是否可循环预览
longPressActions: {
itemList: ['保存图片'],
success: (data) => {
console.log('长按操作成功', data)
},
fail: (err) => {
console.error('长按操作失败', err)
}
}
})
}
function isAtLeastEightChars(str) {
return typeof str === 'string' && str.length >= 12;
}
const openLook = (res) => {
if (isAtLeastEightChars(res)) {
content.value = res;
show.value = true
}
}
const goBack = () => {
uni.navigateBack()
}
const alldata = ref("");
const contentred = ref("")
const specialImge = ref("")
const applyStatus = ref(false);
onLoad((options) => {
if (options.applyStatus) {
applyStatus.value = options.applyStatus
}
alldata.value = JSON.parse(options.element);
let data = alldata.value
targetpage.value = data.modifyType===`zz`?1:0;
console.log(data)
if (data.content) {
contentred.value = data.content
}
console.log(targetpage.value)
if(targetpage.value==1){
textArray[0] = data.name;
textArray[1] = data.sex;
textArray[2] = data.idCard;
textArray[3] = data.national;
textArray[4] = data.dateOfBirth;
textArray[5] = data.houseAddress;
textArray[6] = data.issuingAuthority;
textArray[7] = `${data.startTime}-${swapLongTerm(data.endTime)}`;
fontphoto.value = data.idCardPositive
endphoto.value = data.idCardNegative
specialImge.value = data.idCardPositive
}else{
console.log(123)
textArray1[0] = data.guardianName;
textArray1[1] = data.guardianPhone;
textArray1[2] = data.guardianIdCard;
textArray1[3] = data.guardianHomeAddress;
textArray1[4] = data.guardianWorkUnit;
headImge1.value = `${media_base_url}${data.guardianIdCardPositive}`;
}
console.log(textArray1,11111111111)
getManyDictItems(
`medical_insurance_type&dictCodeList=syb_reimbursement_type&dictCodeList=zgyb_reimbursement_type&dictCodeList=jmyb_reimbursement_type`
).then((res => {
console.log("res", res)
res.medical_insurance_type.forEach(res => {
if (data.medicalType === res.value) {
textArray[8] = res.text;
}
})
if (data.disabilityReimbursementType) {
let name = ""
switch (data.medicalType) {
case 'syb':
name = 'syb_reimbursement_type'
break
case 'zgyb':
name = 'zgyb_reimbursement_type'
break
case 'jmyb':
name = 'jmyb_reimbursement_type'
break
default:
}
console.log("wc",data.medicalType)
textArray[9] = "无";
console.log("ssssssssss",data.disabilityReimbursementType,res[name])
setTimeout(()=>{
console.log("wocao",name)
res[name].forEach(res => {
if (data.disabilityReimbursementType == res.value) {
textArray[9] = res.text;
}
})
},30)
}
}))
})
const changeMessage = () => {
console.log("看看啊", alldata.value)
if (alldata.value.elderModifyStatus == '1') {
openLook("该长者信息正在审核中,请等待")
} else {
let item = alldata.value
uni.setStorageSync("baddata", item)
uni.setStorageSync('specicalid', item.id);
uni.setStorageSync("backhuancun", {})
let data = {
nuId: item.nuId,
orgCode: item.orgCode
}
uni.setStorageSync('oldman', data);
uni.navigateTo({
url: "/pages/addoldman/oldIDcard"
})
}
}
</script>
<style lang="scss" scoped>
.shzt {
width: 638rpx;
min-height: 80rpx;
border-radius: 10rpx;
display: flex;
justify-content: space-between;
margin: 30rpx auto 0;
padding: 20rpx;
background: RGBA(255, 240, 240, 1);
border: 1px solid RGBA(247, 175, 174, 1);
.icoi {
width: 35rpx;
height: 35rpx;
border-radius: 50%;
background: RGBA(237, 72, 69, 1);
color: #fff;
text-align: center;
line-height: 35rpx;
margin-right: 10rpx;
}
}
.container {
display: flex;
flex-direction: column;
min-height: 100vh;
width: 100%;
background-color: #F7F7F7;
position: relative;
overflow: hidden;
.white-content {
width: 90%;
margin-left: 5%;
border-radius: 35rpx;
.content-title {
display: flex;
align-items: center;
height: 100rpx;
position: relative;
font-weight: 600;
.content-weight {
font-size: 32rpx;
}
.content-img {
position: absolute;
right: 0;
top: 0;
width: 400rpx;
height: 100%;
}
}
}
.white-photo {
width: 100%;
height: 300rpx;
border-radius: 35rpx;
background-color: #fff;
justify-content: space-around;
align-items: center;
display: flex;
.photo {
width: 300rpx;
height: 200rpx;
}
}
.white-message {
width: 100%;
margin-top: 20rpx;
padding-top: 20rpx;
padding-bottom: 20rpx;
margin-bottom: 30rpx;
border-radius: 35rpx;
background-color: #fff;
justify-content: space-around;
display: flex;
flex-direction: column;
.one {
width: 90%;
margin-left: 5%;
height: 100rpx;
display: flex;
align-items: center;
margin-bottom: 10rpx;
.one-left {
margin-left: 10rpx;
font-size: 30rpx;
// color: red;
color: black;
z-index: 1;
width: 250rpx;
}
.one-right {
margin-right: 10rpx;
font-size: 30rpx;
color: #999999;
overflow: hidden;
/* 隐藏超出内容 */
white-space: nowrap;
/* 不换行 */
text-overflow: ellipsis;
max-width: 330rpx;
}
}
}
}
.photo-left {
z-index: 1;
.photo-weight {
font-size: 32rpx;
font-weight: 600;
color: #333;
}
.photo-font {
font-size: 28rpx;
margin-top: 10rpx;
color: #999999;
}
}
.gray-font {
padding: 20rpx 60rpx;
padding-bottom: 35rpx;
color: #999999;
}
.title-back {
background-color: #F7F7F7;
width: 100%;
height: 70rpx;
display: flex;
justify-content: space-between;
align-items: flex-end;
padding-bottom: 20rpx;
border-bottom: 1rpx solid #cbd1d2;
position: fixed;
top: 0;
left: 0;
z-index: 9999;
}
.left-father {
display: flex;
align-items: center;
z-index: 1;
.back-img {
width: 45rpx;
height: 40rpx;
margin-left: 40rpx;
margin-right: 15rpx;
}
}
.shu {
width: 14rpx;
height: 36rpx;
background-color: #0097FF;
border-radius: 10rpx;
margin: 3rpx 20rpx 0 30rpx;
}
.line {
margin: 10rpx 0;
}
.shu-img {
position: absolute;
right: 20rpx;
top:48%;
transform: translateY(-40%);
width: 130rpx;
height: 112rpx;
}
.greenbgc {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 700rpx;
}
.contentred {
width: 90%;
border: dashed 3rpx #FF4B2F;
border-radius: 15rpx;
margin: 15rpx 0;
margin-left: 5%;
padding: 5rpx;
.contentred-bgc {
background-color: rgb(240, 228, 228);
border-radius: 15rpx;
color: red;
padding: 20rpx;
padding-bottom: 30rpx;
}
}
.small-blue {
display: flex;
justify-content: center;
align-items: center;
width: 35%;
height: 70rpx;
background: linear-gradient(to bottom, #e7f4ff, #c5e5ff);
border: 2rpx solid #9AD1FF;
color: #007CFF;
border-radius: 30rpx;
font-size: 30rpx;
z-index: 2;
}
.finish-button {
display: flex;
justify-content: center;
align-items: center;
width: 44%;
height: 90rpx;
// margin: 0rpx auto;
margin-bottom: 80rpx;
border: 2rpx solid #9AD1FF;
color: #007CFF;
background: linear-gradient(to bottom, #e7f4ff, #c5e5ff);
border-radius: 37rpx;
font-size: 33rpx;
}
.back-button {
display: flex;
justify-content: center;
align-items: center;
width: 44%;
height: 90rpx;
margin-bottom: 80rpx;
border: 2rpx solid #c3cacd;
background: linear-gradient(to bottom, #f3f3f5, #dee4e9);
border-radius: 37rpx;
font-size: 33rpx;
}
</style>