This commit is contained in:
BianLzhaoMin 2025-11-12 14:43:27 +08:00
parent e331bfc0f4
commit 7783cd98b6
31 changed files with 606 additions and 166 deletions

View File

@ -1,4 +1,5 @@
# VITE_API_BASE_URL = http://112.29.103.165:1616
VITE_API_BASE_URL = /api
# VITE_API_BASE_URL = http://192.168.0.14:1999/hd-real-name
# VITE_API_BASE_URL = /api
VITE_API_BASE_URL = http://192.168.0.14:1999/hd-real-name
# VITE_API_BASE_URL = http://192.168.0.234:38080/hd-real-name
# VITE_API_BASE_URL = http://192.168.0.234:38080

View File

@ -30,7 +30,7 @@
clearable
border="none"
placeholder="请输入合同编号"
:disabled="isEditContractStatus"
:disabled="isEditContractStatus && contractInfoForm.contractCode"
v-model="contractInfoForm.contractCode"
/>
</up-form-item>
@ -148,7 +148,8 @@
</template>
<script setup name="contractForm">
import { ref, watch } from 'vue'
import { ref, watch, onMounted } from 'vue'
import { getMinimumWageStandardSelectList } from '@/utils/common'
const contractFormRef = ref(null) // ref
const dateType = ref(1) // 1: 2:
@ -222,8 +223,10 @@ const contractInfoFormRules = ref({
},
{
trigger: 'blur',
pattern: /^[1-9]\d{0,5}$/,
message: '请输入1-999999之间的正整数',
pattern: '',
message: '',
// pattern: /^[1-9]\d{0,5}$/,
// message: '1-999999',
},
],
})
@ -306,7 +309,8 @@ const afterRead = (e, index, fileType) => {
if (data.code === 200) {
contractImageList.value[index].fileList.push({ isNew: true, ...e.file[0] })
// IDfileList
contractImageIdList.value[index] = { id: data.data, fileType: fileType }
// contractImageIdList.value[index] = { id: data.data, fileType: fileType }
contractImageIdList.value.push({ id: data.data, fileType: fileType })
} else {
uni.$u.toast('上传失败:' + data.msg)
}
@ -405,6 +409,93 @@ const updateContractInfo = () => {
Object.assign(contractInfoForm.value, props.contractInfo)
}
//
const initSalaryRegexp = (num) => {
// num1-999999
const n = Math.min(Math.max(Number(num) || 1, 1), 999999)
const str = n.toString()
const len = str.length
const maxLen = 6 // 9999996
let regexParts = []
// 1. numnum
if (len < maxLen) {
// num31234-61000-999999
for (let i = len + 1; i <= maxLen; i++) {
// 1-9i-10-9
regexParts.push(`[1-9]\\d{${i - 1}}`)
}
}
// 2. numnum
const firstDigit = parseInt(str[0], 10)
const rest = str.slice(1) // num
const maxSameLen = '9'.repeat(len) // 3999
if (str === maxSameLen) {
// num999
regexParts.push(str)
} else {
//
// a. numnum=3454-9
if (firstDigit < 9) {
regexParts.push(`[${firstDigit + 1}-9]\\d{${len - 1}}`)
}
// b. numnum
// num=345345
const restRegex = getRestRegex(rest)
if (restRegex) {
regexParts.push(`${firstDigit}${restRegex}`)
}
}
// ^$
const regexStr = `^(${regexParts.join('|')})$`
contractInfoFormRules.value.wageCriterion[1].pattern = new RegExp(regexStr)
}
// ntargetResttargetRest"45"
const getRestRegex = (targetRest) => {
const len = targetRest.length
if (len === 0) return '' // 1
let result = ''
let isTight = true // targetRest
for (let i = 0; i < len; i++) {
const digit = parseInt(targetRest[i], 10)
if (!isTight) {
// targetRest
result += '\\d'
continue
}
if (digit < 9) {
// digitdigit
result += `([${digit + 1}-9]\\d{${len - i - 1}}|${digit}`
isTight = true
} else {
// 9
result += '9'
isTight = true
}
}
//
if (result.includes('(')) {
result += ')'.repeat((result.match(/\(/g) || []).length)
}
return result
}
//
const initSalaryMessage = (num) => {
// return `${num}-999999`
contractInfoFormRules.value.wageCriterion[1].message = `请输入${num}-999999之间的正整数`
}
//
defineExpose({
validateContractForm,
@ -434,6 +525,20 @@ const props = defineProps({
},
})
onMounted(async () => {
const minSalaryTotal = await getMinimumWageStandardSelectList()
if (!props.isEditContractStatus) {
// contractInfoForm.value.wageCriterion = minSalaryTotal
}
initSalaryRegexp(minSalaryTotal)
initSalaryMessage(minSalaryTotal)
console.log('minSalaryTotal--**----minSalaryTotal', minSalaryTotal)
// contractInfoForm.value.wageCriterion = minSalaryTotal
})
//
watch(
props.contractInfo,

View File

@ -47,6 +47,15 @@
/>
</up-form-item>
<up-form-item label="银行联号" prop="bankIdentifierCode" :borderBottom="true">
<up-input
clearable
border="none"
placeholder="请输入银行联号"
v-model="wageCardInfoForm.bankIdentifierCode"
/>
</up-form-item>
<up-form-item label="银行支行名称" prop="bankBranchName" :borderBottom="true">
<up-input
clearable
@ -68,7 +77,7 @@
>
<up-upload
multiple
:maxCount="1"
:maxCount="3"
accept="image"
:name="item.name"
:fileList="item.fileList"
@ -110,6 +119,7 @@ const wageCardInfoForm = ref({
bankName: '', //
bankCardCode: '', //
bankBranchName: '', //
bankIdentifierCode: '', //
}) //
const deleteFileList = ref([]) // ID
@ -121,24 +131,24 @@ const wageCardImageList = ref([
name: 'wageCard',
title: '手持银行卡、承诺书',
},
{
type: 2,
fileList: [],
name: 'wageCard',
title: '银行卡照片',
},
{
type: 3,
fileList: [],
name: 'wageCard',
title: '个人工资卡承诺书',
},
{
type: 4,
fileList: [],
name: 'wageCard',
title: '其它照片',
},
// {
// type: 2,
// fileList: [],
// name: 'wageCard',
// title: '',
// },
// {
// type: 3,
// fileList: [],
// name: 'wageCard',
// title: '',
// },
// {
// type: 4,
// fileList: [],
// name: 'wageCard',
// title: '',
// },
]) //
const wageCardUploadIdList = ref([]) // ID
const wageCardInfoFormRules = ref({
@ -173,6 +183,16 @@ const wageCardInfoFormRules = ref({
message: '请输入13-19位的正确银行卡号',
},
],
bankIdentifierCode: [
{
required: false,
},
{
trigger: 'blur',
pattern: /^[0-9]{12}$/,
message: '请输入12位的正确银行联号',
},
],
})
const props = defineProps({
@ -235,7 +255,8 @@ const afterRead = (e, index, fileType) => {
if (data.code === 200) {
wageCardImageList.value[index].fileList.push({ isNew: true, ...e.file[0] })
// IDfileList
wageCardUploadIdList.value[index] = { id: data.data, fileType: fileType }
// wageCardUploadIdList.value[index] = { id: data.data, fileType: fileType }
wageCardUploadIdList.value.push({ id: data.data, fileType: fileType })
} else {
uni.$u.toast('上传失败:' + data.msg)
}

View File

@ -38,10 +38,10 @@ const { safeAreaInsets } = uni.getSystemInfoSync()
const contractInfo = ref({})
const contractFileTitle = {
1: '人员手持合同照',
2: '工作内容页',
3: '薪酬约定页',
4: '本人签名页',
5: '其他照片',
// 2: '',
// 3: '',
// 4: '',
// 5: '',
}
const contractContent = [

View File

@ -38,9 +38,9 @@ const { safeAreaInsets } = uni.getSystemInfoSync()
const wageCardInfo = ref({})
const wageCardFileTitle = {
1: '手持银行卡、承诺书',
2: '银行卡照片',
3: '个人工资卡承诺书',
4: '其它照片',
// 2: '',
// 3: '',
// 4: '',
}
const wageCardContent = [
{
@ -57,6 +57,10 @@ const wageCardContent = [
title: '支行名称',
contentKey: 'bankBranchName',
},
{
title: '银行联号',
contentKey: 'bankIdentifierCode',
},
]
const onTapViewImage = (index) => {
@ -72,14 +76,17 @@ onLoad(() => {
const contractParams = app.globalData.contractParams
if (contractParams) {
const { wageFiles, bankName, bankCardCode, bankBranchName } = contractParams
const { wageFiles, bankName, bankCardCode, bankBranchName, bankIdentifierCode } =
contractParams
wageCardInfo.value = {
bankName,
bankCardCode,
bankBranchName,
bankIdentifierCode,
files: wageFiles,
}
console.log(wageCardInfo.value, 'wageCardInfo.value')
}
})
</script>

View File

@ -106,7 +106,11 @@ const onAttendanceHandle = () => {
url: '/bmw/appRecognition/getFaceRecognition',
files: files,
name: 'file',
formData: {},
formData: {
params: JSON.stringify({
proId: commonStore?.activeProjectId,
}),
},
isUploadFile: true,
success: (res) => {
console.log('res人脸识别结果--', res)
@ -134,12 +138,21 @@ const onAttendanceHandle = () => {
checkIntegrity,
},
success: (res) => {
console.log(
'res打卡结果--',
res.data,
typeof res.data,
encryptResponse,
JSON.parse(res.data),
)
let result = null
if (encryptResponse) {
if (encryptResponse && import.meta.env.MODE !== 'development') {
result = JSON.parse(decryptWithSM4(res.data))
} else {
result = JSON.parse(res.data)
}
console.log('result--', result)
if (result.code === 200) {
uni.$u.toast('打卡成功')
} else {

View File

@ -15,7 +15,8 @@
placeholder="输入工程名称"
>
<template #suffix>
<up-icon name="search" size="24" color="#909399" @tap="onSearchName" />
<!-- <up-icon name="search" size="24" color="#909399" @tap="onSearchName" /> -->
<up-icon :name="searchIcon" size="24" color="#909399" @tap="onSearchName" />
</template>
</up-input>
</view>
@ -63,6 +64,7 @@ import { useCommonStore } from '@/stores'
import Empty from '@/static/image/Empty.png'
import NavBarModal from '@/components/NavBarModal/index.vue'
import searchIcon from '@/static/image/home/search.png'
const inputRef = ref(null) //
const allProjectList = ref([]) //

View File

@ -16,7 +16,8 @@
placeholder="输入工程名称"
>
<template #suffix>
<up-icon name="search" size="24" color="#909399" @tap="onSearchName" />
<!-- <up-icon name="search" size="24" color="#909399" @tap="onSearchName" /> -->
<up-icon :name="searchIcon" size="24" color="#909399" @tap="onSearchName" />
</template>
</up-input>
<up-icon
@ -84,7 +85,7 @@
<!-- 右侧筛选面板 -->
<up-popup mode="right" :show="showFilterPanel" @close="onCloseFilter">
<view class="filter-panel">
<view class="filter-panel" :style="{ paddingTop: safeAreaInsets?.top + 'px' }">
<view class="filter-title">条件筛选</view>
<!-- 可滚动的内容区域 -->
@ -190,6 +191,7 @@ import {
import { onLoad } from '@dcloudio/uni-app'
import Empty from '@/static/image/Empty.png'
import NavBarModal from '@/components/NavBarModal/index.vue'
import searchIcon from '@/static/image/home/search.png'
const { safeAreaInsets } = uni.getSystemInfoSync()

View File

@ -134,7 +134,7 @@
<!-- 右侧筛选面板 -->
<up-popup mode="right" :show="showFilterPanel" @close="onCloseFilter">
<view class="filter-panel">
<view class="filter-panel" :style="{ paddingTop: safeAreaInsets?.top + 'px' }">
<view class="filter-title">条件筛选</view>
<!-- 可滚动的内容区域 -->

View File

@ -16,11 +16,43 @@
placeholder="输入班组名称"
>
<template #suffix>
<up-icon name="search" size="24" color="#909399" @tap="onSearchName" />
<!-- <up-icon name="search" size="24" color="#909399" @tap="onSearchName" /> -->
<up-icon :name="searchIcon" size="24" color="#909399" @tap="onSearchName" />
</template>
</up-input>
</view>
<view class="data-summary">已查询 {{ total }} 条数据</view>
<view v-if="isAdvancedOpen" class="advanced-search">
<up-input
clearable
class="search-name"
v-model="queryParams.subName"
placeholder="输入分包名称"
/>
<up-input
clearable
class="search-name"
v-model="queryParams.proName"
placeholder="输入工程名称"
/>
</view>
<view v-if="isAdvancedOpen" class="search-wrapper" style="margin-top: 20rpx">
<up-input
clearable
class="search-name"
v-model="queryParams.subCompanyName"
placeholder="输入分公司名称"
/>
</view>
<view class="data-summary">
<text> 已查询 {{ total }} 条数据 </text>
<up-icon
size="28"
@tap="toggleAdvanced"
style="transform: rotate(270deg)"
:name="isAdvancedOpen ? closeIcon : openIcon"
/>
</view>
</view>
<scroll-view scroll-y class="project-list-content" @scrolltolower="onHandleScrollToLower">
@ -81,13 +113,16 @@ import { getHomeIndexUseTeamMsgAPI } from '@/services/home-index.js'
import { onLoad } from '@dcloudio/uni-app'
import Empty from '@/static/image/Empty.png'
import NavBarModal from '@/components/NavBarModal/index.vue'
import searchIcon from '@/static/image/home/search.png'
import openIcon from '@/static/image/home/open.png'
import closeIcon from '@/static/image/home/close.png'
const { safeAreaInsets } = uni.getSystemInfoSync()
const inputRef = ref(null) //
const projectList = ref([]) //
const total = ref(0) //
const isLoading = ref(false) //
const commonPath = '/pages/home/child-pages/'
const isAdvancedOpen = ref(false) //
//
const queryParams = ref({
pageNum: 1,
@ -95,6 +130,10 @@ const queryParams = ref({
proId: '', //ID
subId: '', //ID
teamName: '', //
subCompanyName: '', //
proName: '', //
subName: '', //
mainProId: '', //ID
})
//
@ -128,6 +167,7 @@ const rowList = ref([
label: '黄灯',
value: 'yellowNum',
class: 'orange',
path: `${commonPath}personInfo/index`,
},
],
},
@ -140,6 +180,10 @@ const onSearchName = () => {
getAllProjectListFun()
}
const toggleAdvanced = () => {
isAdvancedOpen.value = !isAdvancedOpen.value
}
//
const getAllProjectListFun = async (isRefresh = false) => {
const params = {}
@ -149,6 +193,8 @@ const getAllProjectListFun = async (isRefresh = false) => {
params[key] = queryParams.value[key]
}
})
console.log('params--**----params', params)
isLoading.value = true
try {
const res = await getHomeIndexUseTeamMsgAPI(params)
@ -181,23 +227,26 @@ const hasMore = computed(() => {
//
const onInfoGroupTap = (url, label) => {
let path = url
if (label === '绿灯') {
url += `&lightStatus=2`
path += `&lightStatus=2`
}
if (label === '黄灯') {
url += `&lightStatus=1`
console.log('path--**----path', path)
path += `&lightStatus=1`
}
if (label === '今日考勤人数') {
url += `&isAtt=1`
path += `&isAtt=1`
}
uni.navigateTo({
url,
url: path,
})
}
onLoad((options) => {
queryParams.value.proId = options?.proId
queryParams.value.subId = options?.subId
queryParams.value.mainProId = options?.mainProId
getAllProjectListFun()
})
@ -241,10 +290,20 @@ const onHandleHome = () => {
}
}
.advanced-search {
margin-top: 20rpx;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 20rpx;
}
.data-summary {
margin-top: 20rpx;
font-size: 24rpx;
color: #4ca4fe;
display: flex;
align-items: center;
gap: 20rpx;
}
}

View File

@ -17,6 +17,10 @@
<text class="label-text">考勤机名称</text>
<text class="value-text">{{ machineInfo.deviceName }}</text>
</view>
<view class="form-item">
<text class="label-text">出场编号</text>
<text class="value-text">{{ machineInfo.serialNumber }}</text>
</view>
<!-- 点击选择绑定数据提示 -->
<view class="select-tip">
@ -81,6 +85,7 @@
<script setup name="bindSetting">
import { ref, onMounted } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import NavBarModal from '@/components/NavBarModal/index.vue'
const { safeAreaInsets } = uni.getSystemInfoSync()
import {
@ -257,12 +262,7 @@ const onConfirmTeam = (e) => {
teamPickerShow.value = false
}
onMounted(() => {
//
const pages = getCurrentPages()
const currentPage = pages[pages.length - 1]
const options = currentPage.options
onLoad((options) => {
if (options.params) {
// TODO: ID
machineInfo.value = JSON.parse(options.params)

View File

@ -104,7 +104,15 @@ const onSearchName = () => {
//
const getMachineListFun = async (isRefresh = false) => {
const res = await getMachineListAPI(queryParams.value)
const params = {}
// queryParams.valueparams
Object.keys(queryParams.value).forEach((key) => {
if (queryParams.value[key]) {
params[key] = queryParams.value[key]
}
})
const res = await getMachineListAPI(params)
total.value = res?.total
if (isRefresh) {

View File

@ -2,12 +2,7 @@
<!-- 我的 -->
<view class="my-container app-container" :style="{ paddingTop: safeAreaInsets?.top + 'px' }">
<view class="my-info">
<up-image
width="52"
height="52"
shape="circle"
src="https://fc1tn.baidu.com/it/u=1461702690,89837040&fm=202&mola=new&crop=v1"
/>
<up-image width="52" height="52" shape="circle" :src="userInfo?.avatar" />
<view class="my-info-right">
<view class="my-info-name">
@ -60,31 +55,52 @@
@open="onOpenSwitchProject"
@close="onCloseSwitchProject"
>
<view class="switch-project-content">
<view class="my-project-title"> 我管理的工程 </view>
<view>
<up-input clearable v-model="searchProjectValue" placeholder="输入搜索关键词">
<template #suffix>
<up-icon
name="search"
size="24"
color="#909399"
@tap="onSearchProject"
/>
</template>
</up-input>
</view>
<view class="my-project-list">
<view
class="project-item"
:key="item.id"
v-for="item in projectList"
@tap="onSwitchProjectConfirm(item)"
:class="{ active: item.id === activeProjectId }"
>
{{ item.name }}
<view class="switch-project-wrapper">
<view class="switch-project-content">
<view class="my-project-title">
<view class="title-icon">
<up-image width="28" height="28" shape="circle" :src="SwitchImg" />
</view>
<text class="title-text">选择工程</text>
</view>
<view class="search-wrapper">
<up-input
clearable
v-model="searchProjectValue"
placeholder="输入搜索关键词"
:custom-style="{ backgroundColor: '#f8f9fa' }"
>
<template #suffix>
<up-icon
name="search"
size="24"
color="#165DFF"
@tap="onSearchProject"
/>
</template>
</up-input>
</view>
<scroll-view scroll-y class="my-project-list" v-if="projectList.length > 0">
<view
class="project-item"
:key="item.id"
v-for="item in projectList"
@tap="onSwitchProjectConfirm(item)"
:class="{ active: item.id === activeProjectId }"
>
<view class="project-item-left">
<view class="project-icon">
<up-icon name="file-text" size="20" color="#165DFF" />
</view>
<text class="project-name">{{ item.name }}</text>
</view>
<view class="project-item-right">
<up-icon name="arrow-right" size="18" color="#c0c4cc" />
</view>
</view>
</scroll-view>
<view v-else class="empty-container">
<up-empty text="暂无工程" />
</view>
</view>
</view>
@ -148,6 +164,8 @@ const onCancelLogout = () => {
//
const onOpenSwitchProject = () => {
switchProjectShow.value = true
searchProjectValue.value = ''
projectList.value = projectListAll.value
}
//
const onCloseSwitchProject = () => {
@ -169,6 +187,10 @@ const onSearchProject = () => {
}
}
watch(searchProjectValue, () => {
onSearchProject()
})
//
const onSwitchProjectConfirm = (item) => {
activeProjectId.value = item.id
@ -270,49 +292,176 @@ onMounted(() => {
}
}
.switch-project-wrapper {
width: 86vw;
max-width: 600rpx;
max-height: 80vh;
display: flex;
align-items: center;
justify-content: center;
}
.switch-project-content {
width: 80vw;
height: 80vh;
padding: 20rpx;
width: 100%;
max-height: 80vh;
border-radius: 24rpx;
box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.15);
padding: 40rpx 30rpx;
display: flex;
flex-direction: column;
background-color: #fff;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(20rpx);
box-sizing: border-box;
border: 1px solid rgba(255, 255, 255, 0.3);
overflow: hidden;
.my-project-title {
font-size: 18px;
font-weight: bold;
color: #333;
padding: 14rpx 0;
border-bottom: 1px solid #e5e5e5;
text-align: center;
margin-bottom: 30rpx;
display: flex;
align-items: center;
justify-content: center;
gap: 16rpx;
padding-bottom: 24rpx;
border-bottom: 2rpx solid #f0f2f5;
// .title-icon {
// display: flex;
// align-items: center;
// justify-content: center;
// width: 56rpx;
// height: 56rpx;
// background: linear-gradient(135deg, #165dff 0%, #409eff 100%);
// border-radius: 14rpx;
// box-shadow: 0 4rpx 12rpx rgba(22, 93, 255, 0.3);
// :deep(.up-image) {
// border-radius: 50% !important;
// }
// }
.title-text {
font-size: 36rpx;
font-weight: 600;
color: #333;
letter-spacing: 2rpx;
}
}
.search-wrapper {
margin-bottom: 30rpx;
:deep(.up-input) {
border-radius: 16rpx;
overflow: hidden;
}
:deep(.up-input__content) {
padding: 20rpx 24rpx;
}
}
.my-project-list {
flex: 1;
overflow-y: auto;
max-height: calc(80vh - 260rpx);
padding-right: 10rpx;
.project-item {
margin-top: 16rpx;
width: 100%;
padding: 16rpx 24rpx;
border: 1px solid #e5e5e5;
box-sizing: border-box;
border-radius: 14rpx;
background-color: #f0f2f5;
color: #333;
&::-webkit-scrollbar {
width: 6rpx;
}
// .project-item:hover {
// background-color: #f0f7ff;
// border: 1px solid #1580f3;
// color: #1580f3;
// }
&::-webkit-scrollbar-track {
background: #f5f5f5;
border-radius: 10rpx;
}
.active {
background-color: #f0f7ff;
border: 1px solid #1580f3;
color: #1580f3;
&::-webkit-scrollbar-thumb {
background: #165dff;
border-radius: 10rpx;
&:hover {
background: #409eff;
}
}
.project-item {
margin-bottom: 20rpx;
width: 100%;
padding: 28rpx 32rpx;
box-sizing: border-box;
border-radius: 20rpx;
background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
color: #333;
display: flex;
align-items: center;
justify-content: space-between;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.06);
border: 1px solid rgba(22, 93, 255, 0.1);
transition: all 0.3s ease;
&:active {
transform: translateY(2rpx);
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}
.project-item-left {
display: flex;
align-items: center;
gap: 20rpx;
flex: 1;
min-width: 0;
.project-icon {
display: flex;
align-items: center;
justify-content: center;
width: 64rpx;
height: 64rpx;
background: linear-gradient(
135deg,
rgba(22, 93, 255, 0.1) 0%,
rgba(64, 158, 255, 0.1) 100%
);
border-radius: 16rpx;
flex-shrink: 0;
}
.project-name {
font-size: 30rpx;
font-weight: 500;
color: #333;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.project-item-right {
display: flex;
align-items: center;
flex-shrink: 0;
margin-left: 20rpx;
}
&.active {
border-color: rgba(22, 93, 255, 0.3);
box-shadow: 0 6rpx 20rpx rgba(22, 93, 255, 0.15);
background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
}
}
}
.empty-container {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-top: 20rpx;
.up-empty {
margin-bottom: 30rpx;
}
}
}

View File

@ -116,7 +116,7 @@ const hasMore = computed(() => {
//
const onPersonDetails = (item) => {
uni.navigateTo({
url: `/pages/person-details/index?id=${item.workerId}`,
url: `/pages/person-details/index?id=${item.workerId}&proId=${item.proId}`,
})
}

View File

@ -30,6 +30,8 @@ import { ref } from 'vue'
import FaceIcon from '@/static/image/face.png'
import CheckIcon from '@/static/image/person-qua.png'
import NavBarModal from '@/components/NavBarModal/index.vue'
import { useCommonStore } from '@/stores'
const commonStore = useCommonStore() //
const { safeAreaInsets } = uni.getSystemInfoSync()
const showLoading = ref(false) //
@ -52,6 +54,11 @@ const onFaceRecognition = () => {
files: files,
name: 'file',
isUploadFile: true,
formData: {
params: JSON.stringify({
proId: commonStore?.activeProjectId,
}),
},
success: (res) => {
showLoading.value = false
const data = JSON.parse(res.data)
@ -59,7 +66,7 @@ const onFaceRecognition = () => {
uni.$u.toast('人脸识别成功')
setTimeout(() => {
uni.navigateTo({
url: `/pages/person-details/index?id=${data.data.userId}`,
url: `/pages/person-details/index?id=${data.data.userId}&proId=${commonStore?.activeProjectId}`,
})
}, 500)
} else {

View File

@ -217,6 +217,8 @@ const getPersonDetailsByIdFun = async (id, proId) => {
const { name, lightStatus, postName, subName, teamName, proName, facePhoto, attTime } = res.data
personDetailsAll.value = res.data
console.log(res.data, 'res.data')
personDetails.value = {
name,
postName,
@ -227,7 +229,10 @@ const getPersonDetailsByIdFun = async (id, proId) => {
lightStatus,
}
console.log(id, proId, 'id, proId')
const result = await getPersonContractAndWageCardAPI({ id, proId })
console.log(result?.data, 'result?.data')
lightStatusList.value = result?.data
const date = attTime?.split(' ')[0] || null
@ -266,6 +271,7 @@ onLoad((options) => {
border-radius: 10rpx;
border: 1px solid #e5e5e5;
box-shadow: 0 0 10rpx 0 rgba(0, 0, 0, 0.1);
box-sizing: border-box;
}
.person-info-right {
@ -310,7 +316,7 @@ onLoad((options) => {
.status-light {
position: absolute;
right: 20rpx;
top: 220rpx;
top: 19%;
border-radius: 50%;
}
@ -326,6 +332,7 @@ onLoad((options) => {
padding: 20rpx 40rpx;
display: flex;
justify-content: space-between;
align-items: center;
background-color: #f0fced;
font-size: 14px;
}

View File

@ -176,12 +176,12 @@ const contractImageList = ref([
// title: '',
// },
{
type: 6,
fileList: [],
name: 'contract',
title: '附件',
},
// {
// type: 6,
// fileList: [],
// name: 'contract',
// title: '',
// },
]) //
const contractStatus = ref('') //
const isEditContractStatus = ref(false) //
@ -194,24 +194,24 @@ const wageCardImageList = ref([
name: 'wageCard',
title: '手持银行卡、承诺书',
},
{
type: 2,
fileList: [],
name: 'wageCard',
title: '银行卡照片',
},
{
type: 3,
fileList: [],
name: 'wageCard',
title: '个人工资卡承诺书',
},
{
type: 4,
fileList: [],
name: 'wageCard',
title: '其它照片',
},
// {
// type: 2,
// fileList: [],
// name: 'wageCard',
// title: '',
// },
// {
// type: 3,
// fileList: [],
// name: 'wageCard',
// title: '',
// },
// {
// type: 4,
// fileList: [],
// name: 'wageCard',
// title: '',
// },
]) //
const wageCardStatus = ref('') //
@ -312,14 +312,19 @@ const onHandleNext = async () => {
const API = formType.value == 2 ? editPersonEntryApi : addPersonEntryApi
showLoading.value = false
console.log('params--**----请求参数', params)
console.log('params--**----请求参数', params, '请求接口', API)
const result = await API(params)
console.log('res--**----新增或修改的结果', result)
if (result.code === 200) {
// 绿
const workerId = formType.value == 2 ? params.id : result.data
updatePersonLightStatusApi(workerId)
const res = await updatePersonLightStatusApi({
workerId,
proId: keyInfo.value.proId,
})
console.log(res, '更新红绿灯状态的结果')
}
if (result.code === 200) {
@ -356,6 +361,7 @@ const getButtonHeight = () => {
//
const getPersonInfoByIdFun = async (id) => {
console.log(commonStore?.activeProjectId, 'commonStore?.activeProjectId', '----', id)
const res = await getPersonInfoByIdAPI({ id, proId: commonStore?.activeProjectId })
if (res.code === 200) {
@ -450,12 +456,14 @@ const getPersonInfoByIdFun = async (id) => {
if (bmWorkerWageCard && Object.keys(bmWorkerWageCard).length > 0) {
isEditWageCardStatus.value = true
const { bankCardCode, bankName, bankBranchName, id, files } = bmWorkerWageCard
const { bankCardCode, bankName, bankBranchName, id, files, bankIdentifierCode } =
bmWorkerWageCard
wageCardInfo.value = {
bankCardCode,
bankName,
bankBranchName,
bankIdentifierCode,
id,
}

View File

@ -83,7 +83,7 @@ const queryParams = ref({
//
const onEditPerson = (item) => {
uni.navigateTo({
url: `/pages/person-entry/child-pages/addAndEditPerson?id=${item.id}&type=${2}&einStatus=${item.einStatus}`,
url: `/pages/person-entry/child-pages/addAndEditPerson?id=${item.id}&type=${2}&einStatus=${item.einStatus}&proId=${commonStore?.activeProjectId}`,
})
}

View File

@ -36,8 +36,10 @@ import EditIcon from '@/static/image/person/edit.png'
import FaceIcon from '@/static/image/person/face.png'
import ProSettingIcon from '@/static/image/person/pro_setting.png'
import NavBarModal from '@/components/NavBarModal/index.vue'
import { useCommonStore } from '@/stores'
import { ref } from 'vue'
const commonStore = useCommonStore() //
const showLoading = ref(false) //
const { safeAreaInsets } = uni.getSystemInfoSync()
const handleList = [
@ -98,6 +100,11 @@ const handleTapPersonEntry = (item) => {
files: files,
name: 'file',
isUploadFile: true,
formData: {
params: JSON.stringify({
proId: commonStore?.activeProjectId,
}),
},
success: (res) => {
console.log(res, 'res人脸识别结果')
showLoading.value = false
@ -106,7 +113,7 @@ const handleTapPersonEntry = (item) => {
uni.$u.toast('人脸识别成功')
setTimeout(() => {
uni.navigateTo({
url: `/pages/person-details/index?id=${data.data.userId}`,
url: `/pages/person-details/index?id=${data.data.userId}&proId=${commonStore?.activeProjectId}`,
})
}, 500)
} else {

View File

@ -171,6 +171,7 @@ const onConfirmExit = async () => {
uni.$u.toast('出场成功')
setTimeout(() => {
uni.navigateBack()
uni.$emit('refreshPersonExitList', {})
}, 500)
} else {
uni.$u.toast(res.msg)

View File

@ -101,7 +101,7 @@
<script setup name="PersonExit">
import { debounce } from 'lodash-es'
import { ref, computed, onMounted, nextTick } from 'vue'
import { ref, computed, onMounted, nextTick, onUnmounted } from 'vue'
import { getPersonExitListAPI } from '@/services/person-exit.js'
import { useCommonStore } from '@/stores'
@ -147,13 +147,14 @@ const onSearchName = () => {
switch (searchType.value) {
case 1:
queryParams.value.name = searchValue.value
queryParams.value.proName = commonStore?.activeProjectName
queryParams.value.subName = ''
queryParams.value.proName = ''
break
case 2:
queryParams.value.subName = searchValue.value
queryParams.value.proName = commonStore?.activeProjectName
queryParams.value.name = ''
queryParams.value.proName = ''
break
case 3:
queryParams.value.proName = searchValue.value
@ -254,6 +255,11 @@ onMounted(() => {
queryParams.value.proName = commonStore?.activeProjectName
onInputLoaded()
getPersonExitListFun()
uni.$on('refreshPersonExitList', onSearchName)
})
onUnmounted(() => {
uni.$off('refreshPersonExitList', onSearchName)
})
</script>

View File

@ -141,9 +141,9 @@ onMounted(() => {
.switch-project-content {
width: 86vw;
max-width: 600rpx;
// max-width: 600rpx;
height: 80vh;
max-height: 900rpx;
// max-height: 900rpx;
border-radius: 24rpx;
box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.15);
padding: 40rpx 30rpx;

View File

@ -419,6 +419,9 @@ const onHandleSubmitAndContinue = async () => {
//
const submitData = async (isContinue) => {
try {
const params = {
...formData.value,
}
//
const valid = await formRef.value.validate()
if (!valid) {
@ -426,14 +429,12 @@ const submitData = async (isContinue) => {
}
const res = await personContractFormRef.value.validateContractForm()
if (res.isValid) {
console.log(res, 'res校验通过')
return
params.bmWorkerContract = res.data
}
console.log(res, 'res校验失败')
showLoading.value = true
// TODO: API
const result = await addShProjectEntryAPI(formData.value)
const result = await addShProjectEntryAPI(params)
showLoading.value = false
if (result.code === 200) {

View File

@ -90,6 +90,19 @@ export const getVoltageLevelSelectListAPI = () => {
})
}
// 获取字典数据最低工资标准
export const getMinimumWageStandardSelectListAPI = () => {
return http({
url: '/system/dict/data/list',
method: 'GET',
data: {
dictType: 'salary',
pageNum: 1,
pageSize: 100,
},
})
}
// 获取分公司下拉选
export const getSubCompanySelectListAPI = () => {
return http({

View File

@ -4,7 +4,7 @@ import { http } from '@/utils/http'
export const getMachineListAPI = (data) => {
return http({
method: 'GET',
url: `bmw/pmAttDevice/list`,
url: `/bmw/pmAttDevice/list`,
data,
})
}
@ -29,7 +29,7 @@ export const confirmBindPmAttDeviceAPI = (data) => {
export const getSubcontractorListAPI = (data) => {
return http({
method: 'GET',
url: 'bmw/pmSub/getSublistByProId',
url: '/bmw/pmSub/getSublistByProId',
data,
})
}

View File

@ -13,19 +13,17 @@ export const getPersonListAPI = (data) => {
export const getPersonInfoByIdAPI = (data) => {
return http({
method: 'POST',
url: `/bmw/worker/select/${data?.id}/${data.proId}`,
url: `/bmw/worker/select`,
data,
})
}
// 更新人员红绿灯状态
export const updatePersonLightStatusApi = (id) => {
export const updatePersonLightStatusApi = (data) => {
return http({
url: `/bmw/workerWageCard/light/${id}`,
url: `/bmw/workerWageCard/light`,
method: 'POST',
data: {
id,
},
data,
})
}

View File

@ -22,7 +22,8 @@ export const getShProjectListByWorkerIdAPI = (data) => {
export const addShProjectEntryAPI = (data) => {
return http({
method: 'POST',
url: `/bmw/worker/insertProEin`,
// url: `/bmw/worker/insertProEin`,
url: `/bmw/app/appInsertProEin`,
data,
})
}

View File

@ -12,6 +12,7 @@ export const useCommonStore = defineStore(
const voltageLevelList = ref([]) // 电压等级列表
const subCompanyList = ref([]) // 分公司列表
const postTypeList = ref([]) // 工种列表
const minSalaryTotal = ref(0) // 最低工资标准
const requestConfig = ref({
encryptRequest: false,
checkIntegrity: false,
@ -69,6 +70,11 @@ export const useCommonStore = defineStore(
postTypeList.value = list
}
// 设置最低工资标准
const setMinSalaryTotal = (total) => {
minSalaryTotal.value = total
}
return {
activeProjectId,
activeProjectName,
@ -78,6 +84,7 @@ export const useCommonStore = defineStore(
voltageLevelList,
subCompanyList,
postTypeList,
minSalaryTotal,
setActiveProjectIdAndName,
clearActiveProjectIdAndName,
setRequestConfig,
@ -87,6 +94,7 @@ export const useCommonStore = defineStore(
setVoltageLevelList,
setSubCompanyList,
setPostTypeList,
setMinSalaryTotal,
}
},

View File

@ -4,6 +4,7 @@ import {
getVoltageLevelSelectListAPI,
getSubCompanySelectListAPI,
getPostTypeListAPI,
getMinimumWageStandardSelectListAPI,
} from '@/services/common'
import { useCommonStore } from '@/stores'
@ -61,3 +62,14 @@ export const getPostTypeList = async () => {
commonStore.setPostTypeList(res?.rows)
return res?.rows
}
// 获取最低工资标准下拉列表
export const getMinimumWageStandardSelectList = async () => {
const commonStore = useCommonStore()
if (commonStore.minSalaryTotal > 0) {
return commonStore.minSalaryTotal
}
const res = await getMinimumWageStandardSelectListAPI()
commonStore.minSalaryTotal = res.rows.find((item) => item.dictLabel == 'min')?.dictValue * 1
return commonStore.minSalaryTotal
}

View File

@ -82,6 +82,8 @@ const httpInterceptor = {
options.data = {}
options.url = url
console.log('url--**----请求url', url)
}
}
}
@ -112,6 +114,8 @@ export const http = (options) => {
res.data = JSON.parse(decryptWithSM4(res.data))
}
console.log('res--**----返回数据', res)
// 1. 判断是否请求成功
if (res.statusCode >= 200 && res.statusCode < 300) {
if (res.data) {

View File

@ -11,7 +11,7 @@ export default defineConfig({
// target: 'http://112.29.103.165:1616', // 测试环境
// target: 'http://192.168.0.133:58080', // 梁超
target: 'http://192.168.0.14:1999/hd-real-name', // 测试环境
// target: 'http://192.168.0.234:38080', // 方亮
// target: 'http://192.168.0.234:38080/hd-real-name', // 方亮
changeOrigin: true,
rewrite: (path) => {
return path.replace(/\/api/, '')