| 
						 
							
							
							
						 
					 | 
				
			
			 | 
			 | 
			
				@ -1,3 +1,4 @@
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import dayjs from 'dayjs'
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import { TableProMaxProps, TableProMaxSlots } from '@/types/components/table'
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import { EnterprisesUnitPagerQueryParams, securityUnitIdListPagerVo, securityUnitIdListParams, PoliceUnitPagerVo } from '@/types/views/unitManage/police/policeUnit.ts'
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import { reactive, ref, h } from 'vue'
 | 
			
		
		
	
	
		
			
				
					| 
						
					 | 
				
			
			 | 
			 | 
			
				@ -34,10 +35,23 @@ const _formParams = reactive<securityUnitIdListParams>({
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  homeAddress: '',
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  remark: '',
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				})
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				const cardBlur = () => {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  let value = _formParams.idCard
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  if (!value?.length || value.length < 18) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    _formParams.dateOfBirth = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    return
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  const birthDate = value.substring(6, 14)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  const year = birthDate.substring(0, 4)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  const month = birthDate.substring(4, 6)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  const day = birthDate.substring(6, 8)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  var _data = new Date(parseInt(year), parseInt(month) - 1, parseInt(day))
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  _formParams.dateOfBirth = dayjs(_data).format('YYYY-MM-DD HH:mm:ss')
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  console.log('🚀 ~ cardBlur ~ _data:', _formParams.dateOfBirth)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				const searchSecurityUnitId = debounce(async () => {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  if (process.env.NODE_ENV === 'development') {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    // console.log('process.env.NODE_ENV === development')
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    console.log('process.env.NODE_ENV === development')
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    const res = await axios.get(`https://www.hnjinglian.cn:5678/common/querySecurityNumberByIdCard?idCard=${_formParams.idCard}`)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    if (res.data?.data?.hasOwnProperty('bayzh')) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      _formParams.securityNumber = res.data.data.bayzh
 | 
			
		
		
	
	
		
			
				
					| 
						
					 | 
				
			
			 | 
			 | 
			
				@ -47,13 +61,15 @@ const searchSecurityUnitId = debounce(async () => {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  } else {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    const res = await api.get<any>('/common/querySecurityNumberByIdCard', { idCard: _formParams.idCard })
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    if (res.data?.data?.hasOwnProperty('bayzh')) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      _formParams.securityNumber = res.data.data.bayzh
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      message.success(res.data.message)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    console.log(res)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    if (res.data?.hasOwnProperty('bayzh')) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      _formParams.securityNumber = res.data.bayzh
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      message.success(res.message)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    } else {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      message.error('未查询到保安证件号')
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  cardBlur()
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				}, 300)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				const saveOrUpdateEnterprisesUnit = (callback: Function, params, type: string) => {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  // console.log('🚀 ~ saveOrUpdateEnterprisesUnit ~ params:', params)
 | 
			
		
		
	
	
		
			
				
					| 
						
					 | 
				
			
			 | 
			 | 
			
				@ -165,28 +181,31 @@ const saveOrUpdateEnterprisesUnit = (callback: Function, params, type: string) =
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        ..._formParams,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      })
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      message.success(resp.message)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      clearForm()
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      callback && callback()
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    },
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    onCancel: async () => {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      _formParams.snowFlakeId = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      _formParams.serviceProjectId = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      _formParams.securityUnitId = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      _formParams.name = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      _formParams.photo = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      _formParams.telephone = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      _formParams.workPost = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      _formParams.sex = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      _formParams.nativePlace = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      _formParams.idCard = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      _formParams.dateOfBirth = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      _formParams.securityNumber = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      _formParams.noSecurityNumberDesc = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      _formParams.homeAddress = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      _formParams.remark = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      clearForm()
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    },
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  })
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				const clearForm = () => {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  _formParams.snowFlakeId = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  _formParams.serviceProjectId = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  _formParams.securityUnitId = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  _formParams.name = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  _formParams.photo = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  _formParams.telephone = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  _formParams.workPost = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  _formParams.sex = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  _formParams.nativePlace = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  _formParams.idCard = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  _formParams.dateOfBirth = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  _formParams.securityNumber = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  _formParams.noSecurityNumberDesc = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  _formParams.homeAddress = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  _formParams.remark = ''
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				export const showEnterprisesUnit = (record_) => {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  // console.log('🚀 ~ showEnterprisesUnit ~ record_:', record_)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  const _tableRef = ref<ComponentExposed<typeof TableProMax>>(null)
 | 
			
		
		
	
	
		
			
				
					| 
						
					 | 
				
			
			 | 
			 | 
			
				
 
 |