hldy_xcx/pages/yuangongindex/searchjigou.vue

586 lines
14 KiB
Vue
Raw Normal View History

2025-09-09 17:45:04 +08:00
<template>
<view class="container">
2025-10-13 14:58:45 +08:00
<!-- <view class="title-back">
2025-09-09 17:45:04 +08:00
<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;">入驻机构</view>
</view>
2025-10-13 14:58:45 +08:00
</view> -->
2025-10-20 09:29:15 +08:00
<view class="title-back" :style="{height:`${uni.getStorageSync('moveHeight')+40}px`}">
2025-10-13 14:58:45 +08:00
<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;">入驻机构</view>
</view>
2025-09-09 17:45:04 +08:00
</view>
2025-10-20 09:29:15 +08:00
<view :style="{height:`${uni.getStorageSync('moveHeight') + 40}px`}"></view>
2025-09-09 17:45:04 +08:00
<view class="zhiling-box" style="margin-top: 30rpx;height: 120rpx;justify-content: flex-start;">
<view class="input-all">
<image
style="position: absolute;left: 20rpx;top: 50%;transform: translateY(-50%);width: 40rpx;height: 40rpx;"
src="https://www.focusnu.com/media/directive/index/search.png" />
2025-09-10 17:23:15 +08:00
<input style="font-size: 31rpx;" type="text" v-model="supervalue" placeholder="请输入入驻护理机构名称"
2025-09-15 17:23:33 +08:00
@confirm="search" @input="detectinput" />
2025-09-09 17:45:04 +08:00
<view @click="clearvalue" v-if="supervalue"
style="position: absolute;right: 20rpx;top: 50%;transform: translateY(-50%);width: 40rpx;height: 40rpx;display: flex;justify-content: center;align-items: center;border-radius: 50%;background-color: #EBEBEB;">
2025-09-10 17:23:15 +08:00
<image style="width: 20rpx;height: 20rpx;"
2025-09-09 17:45:04 +08:00
src="https://www.focusnu.com/media/directive/index/cha.png" />
</view>
</view>
<view class="tianjia" @click="search">
检索
</view>
</view>
<view style="width: 100%;display: flex;flex-wrap: wrap;">
2025-09-10 17:23:15 +08:00
<view v-for="(item,index) in hulijigouArray" :key="index" class="zhiling-box-card"
:style="hulitarget===index?{border:`4rpx solid #0093FF`}:{}"
style="margin-top: 30rpx;height: 300rpx;position: relative;width: 92%;flex-direction: column;"
@click="clickCard(index)">
2025-09-15 17:23:33 +08:00
<!-- <view style="position: absolute;right: 0rpx;bottom: -14rpx;" v-if="hulitarget===index">
2025-09-09 17:45:04 +08:00
<image style="width: 60rpx;height: 60rpx;"
src="https://www.focusnu.com/media/directive/index/lemon.png" />
2025-09-15 17:23:33 +08:00
</view> -->
2025-09-10 17:23:15 +08:00
<view class="card-font">
2025-09-15 17:23:33 +08:00
2025-09-10 17:23:15 +08:00
{{item.departName}}
</view>
<view class="gray-font">
2025-10-13 14:58:45 +08:00
<image style="margin-left: 10rpx;height: 23rpx;width: 23rpx;margin-right: 10rpx;margin-top: 5rpx;"
2025-09-15 17:23:33 +08:00
src="https://www.focusnu.com/media/directive/index/ruzhu/man.png" />
2025-10-13 14:58:45 +08:00
{{ item.comLegalPerson }}
<view style="margin: 0 20rpx;">
|
</view>
<image style="margin-left: 10rpx;height: 23rpx;width: 23rpx;margin-right: 10rpx;margin-top: 8rpx;"
2025-09-15 17:23:33 +08:00
src="https://www.focusnu.com/media/directive/index/ruzhu/phone.png" />
{{ item.tel }}
2025-09-10 17:23:15 +08:00
</view>
2025-10-13 15:57:20 +08:00
<!-- <view class="applying" v-if="item.employeesApiEntity?.status===`1`">
2025-09-25 17:30:11 +08:00
{{ item.employeesApiEntity.applyType=='1' ? "申请中" : "待确认" }}
2025-09-15 17:23:33 +08:00
2025-09-09 17:45:04 +08:00
</view>
<view class="applysuccess" v-if="item.employeesApiEntity?.status===`2`">
2025-09-15 17:23:33 +08:00
2025-09-25 17:30:11 +08:00
{{ item.employeesApiEntity.applyType=='1' ? "申请通过" : "已接受" }}
2025-09-09 17:45:04 +08:00
</view>
<view class="applyfail" v-if="item.employeesApiEntity?.status===`3`">
2025-09-25 17:30:11 +08:00
{{ item.employeesApiEntity.applyType=='1' ? "申请驳回" : "已拒绝" }}
2025-09-15 17:23:33 +08:00
</view> -->
2025-10-13 15:57:20 +08:00
<view class="applying"
v-if="item.employeesApiEntity?.status===`1`&&item.employeesApiEntity.applyType!=`2`">
{{ item.employeesApiEntity.applyType =='0' ?`待确认`:`申请中` }}
</view>
<view class="applysuccess"
v-if="item.employeesApiEntity?.status===`2`&&item.employeesApiEntity.applyType!=`2`">
{{ item.employeesApiEntity.applyType =='0' ?`已接受`:`申请通过` }}
</view>
<view class="applyfail"
v-if="item.employeesApiEntity?.status===`3`&&item.employeesApiEntity.applyType!=`2`">
2025-10-14 15:46:44 +08:00
{{ item.employeesApiEntity.applyType =='0' ?`已拒绝`:`申请驳回` }}
2025-10-13 15:57:20 +08:00
</view>
<view class="applying"
v-if="item.employeesApiEntity?.status===`1`&&item.employeesApiEntity.applyType==`2`">
变更中
</view>
<view class="applysuccess"
v-if="item.employeesApiEntity?.status===`2`&&item.employeesApiEntity.applyType==`2`">
变更通过
</view>
<view class="applyfail"
v-if="item.employeesApiEntity?.status===`3`&&item.employeesApiEntity.applyType==`2`">
变更驳回
</view>
2025-09-10 17:23:15 +08:00
<view class="gray-bgc">
2025-09-15 17:23:33 +08:00
<image class="gray-img" src="https://www.focusnu.com/media/directive/index/ditu/bgc.png" />
<view style="color: #999999;z-index: 1;font-size: 27rpx;width: 100%;display: flex;">
<image
style="margin-left: 10rpx;height: 30rpx;width: 25rpx;margin-right: 10rpx;z-index: 1;margin-top: 8rpx"
src="https://www.focusnu.com/media/directive/index/ditu/mark.png" />
<view style="width: 630rpx;">
{{item.comRegisterAddress}}
</view>
2025-09-10 17:23:15 +08:00
</view>
2025-09-09 17:45:04 +08:00
</view>
</view>
</view>
<!-- 处理margin重叠 -->
<view style="height: 200rpx;">
</view>
<view class="button-father">
<view class="blue-button" @click="apply" v-if="buttonOpen">
申请
</view>
<view class="white-button" v-else>
申请
</view>
</view>
<u-popup v-model="popupshow" mode="bottom" border-radius="40">
<view class="popop-father">
<image style="width: 100rpx;height: 100rpx;"
src="https://www.focusnu.com/media/directive/index/tishi.png" />
<view class="popop-font">
入驻申请已提交请到
<text style="color: #01A9FF;">
2025-10-13 15:57:20 +08:00
"我的-审核记录"
2025-09-09 17:45:04 +08:00
</text>
查看审核进度
</view>
<view class="popop-blue" @click="jumpRuzhu()">
查看
</view>
</view>
</u-popup>
</view>
</template>
<script setup lang="ts">
import {
reactive,
ref,
onMounted,
2025-09-15 17:23:33 +08:00
onUnmounted,
2025-09-09 17:45:04 +08:00
} from 'vue';
2025-09-15 17:23:33 +08:00
import {
onShow
} from '@dcloudio/uni-app'
2025-09-10 17:23:15 +08:00
2025-09-09 17:45:04 +08:00
import { getOrgInfo, Apply } from './api.js'
2025-09-23 17:15:17 +08:00
import {
getMessageList
} from '@/pages/addstaff/api/addjigou.js'
2025-09-19 17:12:59 +08:00
onShow((() => {
search();
2025-09-23 17:15:17 +08:00
2025-09-19 17:12:59 +08:00
}))
2025-09-09 17:45:04 +08:00
const hulijigouArray = ref([])
const hulitarget = ref(-1)
const popupshow = ref(false);
const supervalue = ref("");
const jumpRuzhu = () => {
2025-09-10 17:23:15 +08:00
popupshow.value = false
2025-09-09 17:45:04 +08:00
uni.navigateTo({
url: "/pages/yuangongindex/workjoin"
})
}
2025-09-15 17:23:33 +08:00
let inputTimer = null
const detectinput = () => {
// clear + set会在最后一次输入后 600ms 执行
if (inputTimer) clearTimeout(inputTimer)
inputTimer = setTimeout(() => {
inputTimer = null
// 这里是真正触发的逻辑
search()
}, 600) // 600ms = 0.6s
}
onUnmounted(() => {
if (inputTimer) clearTimeout(inputTimer)
})
2025-09-09 17:45:04 +08:00
const buttonOpen = ref(false);
const clickCard = (index : number) => {
if (hulitarget.value === index) {
hulitarget.value = -1;
buttonOpen.value = false;
} else {
2025-11-19 14:34:05 +08:00
hulitarget.value = index;
2025-10-13 15:57:20 +08:00
if (
(
(hulijigouArray.value[index].employeesApiEntity?.applyType == 0 || hulijigouArray.value[index].employeesApiEntity?.applyType == 1) &&
(hulijigouArray.value[index].employeesApiEntity.status == 1 || hulijigouArray.value[index].employeesApiEntity.status == 2)
) ||
hulijigouArray.value[index].employeesApiEntity?.applyType == 2
) {
2025-09-09 17:45:04 +08:00
buttonOpen.value = false;
2025-09-10 17:23:15 +08:00
} else {
2025-09-09 17:45:04 +08:00
buttonOpen.value = true;
}
}
}
const clearvalue = () => {
hulitarget.value = -1;
2025-09-15 17:23:33 +08:00
supervalue.value = "";
search()
2025-09-09 17:45:04 +08:00
}
const goBack = () => {
uni.navigateBack()
}
const search = () => {
2025-09-10 17:23:15 +08:00
buttonOpen.value = false;
hulitarget.value = -1;
2025-09-09 17:45:04 +08:00
getOrgInfo(supervalue.value).then((res : any) => {
if (res.success) {
hulijigouArray.value = res.result.records
}
})
}
2025-09-10 17:23:15 +08:00
const sumbit = ref(false);
2025-09-15 17:23:33 +08:00
2025-09-09 17:45:04 +08:00
const apply = () => {
2025-11-11 17:30:10 +08:00
// if (sumbit.value) {
// return
// }
2025-09-10 17:23:15 +08:00
sumbit.value = true;
2025-09-09 17:45:04 +08:00
// 先拿出来
2025-11-11 17:30:10 +08:00
let data = uni.getStorageSync('staff') || {}
2025-09-09 17:45:04 +08:00
// 如果是字符串需要先 parse
// let data = typeof storageData === 'string' ? JSON.parse(storageData) : { ...storageData }
// 避免污染原对象,拷贝一份
2025-11-19 14:34:05 +08:00
// console.log("?????",data)
2025-09-09 17:45:04 +08:00
data = {
...data,
2025-09-10 17:23:15 +08:00
dateOfBirth: data.birthDate,
marriedOrNot: data.maritalStatus,
address: data.address,
emergencyContact: data.contactName,
emergencyTel: data.contactTel,
emergencyRelationship: data.contactRelationship,
2025-09-15 17:23:33 +08:00
hukouNature: data.hukouType,
idCardPositive: data.cardZmPath,
idCardNegative: data.cardFmPath,
healthCertificatePositive: data.healthZmPath,
healthCertificateNegative: data.healthFmPath,
bankPositive: data.bankZmPath,
bankNegative: data.bankFmPath,
qualification: data.qualificationPath,
noCrimeCertificate: data.noCrimeCertificate,
houseAddress: data.idCardAddress,
2025-09-10 17:23:15 +08:00
employeeId: data.id,
2025-09-09 17:45:04 +08:00
id: null,
createTime: null,
updateBy: null,
updateTime: null,
orgCode: hulijigouArray.value[hulitarget.value].orgCode
}
2025-09-23 17:15:17 +08:00
getMessageList().then(res => {
2025-11-19 14:34:05 +08:00
// console.log("有啥啊",res.result)
// return
2025-09-23 17:15:17 +08:00
if (Array.isArray(res.result) && res.result.length === 0) {
// 这个是检测他有没有员工信息,没有的话让他去填员工信息,别忘了用完去掉
uni.setStorageSync('nostaffmessage', hulijigouArray.value[hulitarget.value].orgCode);
//表单ID
uni.setStorageSync('specicalid', "");
//表单详情
uni.setStorageSync("baddata", "")
//表单缓存
uni.setStorageSync("backhuancun", {})
uni.navigateTo({
url: `/pages/addstaff/information`
});
} else {
Apply(data).then((data : any) => {
if (data.success) {
uni.requestSubscribeMessage({
// 这里填后台申请好的 templateId 数组
tmplIds: ['cWVzXm1C-iitx1gNFn1nZdijq9R_3fCv8vLbiqs9zww'],
success: (res) => {
popupshow.value = true
setTimeout(() => search(), 1000)
},
fail: (err) => {
console.error('订阅接口调用失败:', err);
uni.showToast({
title: '订阅失败',
icon: 'none'
});
}
});
2025-09-15 17:23:33 +08:00
2025-09-19 17:12:59 +08:00
}
2025-09-23 17:15:17 +08:00
setTimeout(() => sumbit.value = false, 1000)
2025-09-10 17:23:15 +08:00
2025-09-23 17:15:17 +08:00
})
2025-09-09 17:45:04 +08:00
}
2025-09-23 17:15:17 +08:00
// if (res.success) {
// uni.navigateTo({
// url: `/pages/addstaff/all?element=${JSON.stringify(res.result[0])}`
// });
// }
2025-09-15 17:23:33 +08:00
2025-09-09 17:45:04 +08:00
})
2025-09-23 17:15:17 +08:00
2025-09-09 17:45:04 +08:00
}
2025-09-15 17:23:33 +08:00
// search()
2025-09-09 17:45:04 +08:00
</script>
<style lang="scss" scoped>
.container {
display: flex;
flex-direction: column;
min-height: 100vh;
width: 100%;
background-color: #F7F7F7;
position: relative;
}
.title-back {
2025-10-20 09:29:15 +08:00
background-color: #F7F7F7;
2025-09-09 17:45:04 +08:00
width: 100%;
2025-10-13 14:58:45 +08:00
height: 70rpx;
2025-09-09 17:45:04 +08:00
display: flex;
justify-content: space-between;
2025-10-13 14:58:45 +08:00
align-items: flex-end;
padding-bottom: 20rpx;
border-bottom: 1rpx solid #cbd1d2;
position: fixed;
top: 0;
left: 0;
z-index: 9999;
2025-09-09 17:45:04 +08:00
}
.left-father {
display: flex;
align-items: center;
.back-img {
width: 45rpx;
height: 40rpx;
margin-left: 40rpx;
margin-right: 15rpx;
}
}
.tianjia {
width: 120rpx;
height: 70rpx;
background: linear-gradient(to bottom, #e7f4ff, #c5e5ff);
2025-11-19 14:34:05 +08:00
border: 2rpx solid #9AD1FF;
color: #007CFF;
2025-09-09 17:45:04 +08:00
display: flex;
justify-content: center;
align-items: center;
2025-09-10 17:23:15 +08:00
border-radius: 30rpx;
2025-09-09 17:45:04 +08:00
margin-left: 10rpx;
}
.zhiling-box {
display: flex;
justify-content: space-around;
align-items: center;
2025-09-10 17:23:15 +08:00
2025-09-09 17:45:04 +08:00
width: 92%;
margin-left: 4%;
height: 110rpx;
background-color: #fff;
border-radius: 35rpx;
font-size: 32rpx;
border: 4rpx solid #fff;
}
2025-09-10 17:23:15 +08:00
2025-09-09 17:45:04 +08:00
.input-all {
width: 500rpx;
height: 65rpx;
border-radius: 30rpx;
background-color: #F7F7F7;
padding-left: 80rpx;
2025-09-10 17:23:15 +08:00
margin-left: 30rpx;
2025-09-09 17:45:04 +08:00
display: flex;
align-items: center;
position: relative;
}
.popop-father {
width: 100%;
height: 600rpx;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.popop-font {
margin-top: 40rpx;
width: 70%;
text-align: center;
line-height: 40rpx;
font-size: 30rpx;
margin-bottom: 100rpx;
}
.popop-blue {
display: flex;
justify-content: center;
align-items: center;
width: 80%;
display: flex;
justify-content: center;
align-items: center;
height: 90rpx;
border-radius: 35rpx;
background: linear-gradient(to bottom, #e7f4ff, #c5e5ff);
2025-11-19 14:34:05 +08:00
border: 2rpx solid #9AD1FF;
color: #007CFF;
2025-09-09 17:45:04 +08:00
font-size: 33rpx;
margin-bottom: 30rpx;
}
.button-father {
position: fixed;
bottom: 0rpx;
left: 0;
width: 100%;
display: flex;
justify-content: center;
2025-10-20 09:29:15 +08:00
background-color: #F7F7F7;
2025-10-14 08:42:52 +08:00
z-index: 9999;
2025-09-09 17:45:04 +08:00
}
.blue-button {
display: flex;
justify-content: center;
align-items: center;
width: 80%;
height: 90rpx;
margin: 0rpx auto;
margin-bottom: 80rpx;
margin-top: 20rpx;
background: linear-gradient(to bottom, #e7f4ff, #c5e5ff);
2025-11-19 14:34:05 +08:00
border: 2rpx solid #9AD1FF;
color: #007CFF;
2025-09-09 17:45:04 +08:00
border-radius: 35rpx;
font-size: 33rpx;
}
.white-button {
display: flex;
justify-content: center;
align-items: center;
width: 80%;
height: 90rpx;
margin: 0rpx auto;
margin-bottom: 80rpx;
margin-top: 20rpx;
// color: #fff;
background: linear-gradient(to bottom, #f3f3f5, #dee4e9);
border-radius: 35rpx;
font-size: 33rpx;
}
2025-09-10 17:23:15 +08:00
.zhiling-box-card {
display: flex;
width: 92%;
margin-left: 4%;
height: 150rpx;
background-color: #fff;
border-radius: 35rpx;
font-size: 32rpx;
border: 4rpx solid #fff;
overflow: hidden;
2025-09-09 17:45:04 +08:00
}
2025-09-10 17:23:15 +08:00
.applying {
2025-09-15 17:23:33 +08:00
position: absolute;
right: 20rpx;
top: 0rpx;
2025-09-09 17:45:04 +08:00
background-color: #FFE8D3;
color: #FF7900;
2025-09-10 17:23:15 +08:00
width: 130rpx;
2025-09-09 17:45:04 +08:00
height: 50rpx;
display: flex;
justify-content: center;
align-items: center;
2025-09-10 17:23:15 +08:00
font-size: 28rpx;
2025-09-09 17:45:04 +08:00
border-radius: 10rpx;
2025-09-10 17:23:15 +08:00
margin-left: 35rpx;
margin-top: 25rpx;
// margin-top: 20rpx;
// margin-bottom: 20rpx;
2025-09-09 17:45:04 +08:00
}
2025-09-10 17:23:15 +08:00
.applysuccess {
2025-09-15 17:23:33 +08:00
position: absolute;
right: 20rpx;
top: 0rpx;
2025-09-09 17:45:04 +08:00
background-color: #DEF1FF;
color: #0093FF;
2025-09-10 17:23:15 +08:00
width: 130rpx;
2025-09-09 17:45:04 +08:00
height: 50rpx;
display: flex;
justify-content: center;
align-items: center;
2025-09-10 17:23:15 +08:00
font-size: 28rpx;
2025-09-09 17:45:04 +08:00
border-radius: 10rpx;
2025-09-10 17:23:15 +08:00
margin-left: 35rpx;
margin-top: 25rpx;
// margin-bottom: 20rpx;
2025-09-09 17:45:04 +08:00
}
2025-09-10 17:23:15 +08:00
.applyfail {
2025-09-15 17:23:33 +08:00
position: absolute;
right: 20rpx;
top: 0rpx;
background-color: #fff4f7;
2025-09-09 17:45:04 +08:00
color: #FC3D7F;
2025-09-10 17:23:15 +08:00
width: 130rpx;
2025-09-09 17:45:04 +08:00
height: 50rpx;
display: flex;
justify-content: center;
align-items: center;
2025-09-10 17:23:15 +08:00
font-size: 28rpx;
2025-09-09 17:45:04 +08:00
border-radius: 10rpx;
2025-09-10 17:23:15 +08:00
margin-left: 35rpx;
2025-09-09 17:45:04 +08:00
margin-top: 20rpx;
2025-09-10 17:23:15 +08:00
// margin-bottom: 20rpx;
}
.card-font {
margin-left: 40rpx;
font-size: 32rpx;
margin-top: 30rpx;
2025-09-15 17:23:33 +08:00
word-wrap: break-word;
width: 450rpx;
font-weight: 600;
2025-09-10 17:23:15 +08:00
}
.gray-font {
margin-left: 40rpx;
2025-10-13 14:58:45 +08:00
font-size: 29rpx;
margin-top: 20rpx;
2025-09-09 17:45:04 +08:00
color: #B1B1B1;
width: 100%;
2025-10-13 14:58:45 +08:00
display: flex;
align-items: center;
2025-09-10 17:23:15 +08:00
}
.gray-bgc {
margin: 20rpx 40rpx;
width: 90%;
2025-09-15 17:23:33 +08:00
height: 90rpx;
2025-09-10 17:23:15 +08:00
border-radius: 10rpx;
2025-09-09 17:45:04 +08:00
display: flex;
2025-09-10 17:23:15 +08:00
align-items: center;
position: relative;
2025-09-15 17:23:33 +08:00
line-height: 40rpx;
2025-09-10 17:23:15 +08:00
.gray-img {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
2025-09-09 17:45:04 +08:00
}
</style>