Compare commits
No commits in common. "b49833510873da585c372b6dd133393a926f2a39" and "b086e5a49f5186f997a884795e8b286f3dfd26de" have entirely different histories.
b498335108
...
b086e5a49f
|
@ -9,7 +9,6 @@ type EnumType =
|
||||||
| 'Sex'
|
| 'Sex'
|
||||||
| 'ServiceProjectType'
|
| 'ServiceProjectType'
|
||||||
| 'MiniProgramUserIdentity'
|
| 'MiniProgramUserIdentity'
|
||||||
| 'EducationLevel'
|
|
||||||
|
|
||||||
export const initEnum = () => {
|
export const initEnum = () => {
|
||||||
api.get<Record<EnumType, SelectNodeVo<any>[]>>('/common/enums').then(resp => {
|
api.get<Record<EnumType, SelectNodeVo<any>[]>>('/common/enums').then(resp => {
|
||||||
|
|
|
@ -96,11 +96,10 @@
|
||||||
<nut-dialog no-cancel-btn content="详情" v-model:visible="detailVisible">
|
<nut-dialog no-cancel-btn content="详情" v-model:visible="detailVisible">
|
||||||
<slot>
|
<slot>
|
||||||
<view style="margin-bottom: 5px">
|
<view style="margin-bottom: 5px">
|
||||||
<view>籍贯:{{ securityUserDetail?.nativePlace }}</view>
|
<view>籍贯:{{ securityUserDetail.nativePlace }}</view>
|
||||||
<view>公司:{{ securityUserDetail?.securityUnitName }}</view>
|
<view>公司:{{ securityUserDetail.securityUnitName }}</view>
|
||||||
<view>家庭地址:{{ securityUserDetail?.homeAddress }}</view>
|
<view>家庭地址:{{ securityUserDetail.homeAddress }}</view>
|
||||||
<view>文化程度:{{ securityUserDetail.educationLevel?.label }}</view>
|
<view>备注:{{ securityUserDetail.remark }}</view>
|
||||||
<view>备注:{{ securityUserDetail?.remark }}</view>
|
|
||||||
</view>
|
</view>
|
||||||
</slot>
|
</slot>
|
||||||
</nut-dialog>
|
</nut-dialog>
|
||||||
|
@ -241,7 +240,7 @@ const detail = (item: ServiceProjectSecurityUserPagerVo) => {
|
||||||
}
|
}
|
||||||
const securityUserEdit = (item: ServiceProjectSecurityUserPagerVo) => {
|
const securityUserEdit = (item: ServiceProjectSecurityUserPagerVo) => {
|
||||||
console.log(item)
|
console.log(item)
|
||||||
const params = {...item, sex: item.sex.value,educationLevel:item.educationLevel}
|
const params = {...item, sex: item.sex.value}
|
||||||
Taro.navigateTo({url: `/subPages/projectManager/securityUserForm/securityUserForm?securityUser=${JSON.stringify(params)}&type=formInput`})
|
Taro.navigateTo({url: `/subPages/projectManager/securityUserForm/securityUserForm?securityUser=${JSON.stringify(params)}&type=formInput`})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,11 +38,6 @@
|
||||||
<nut-form-item label="手机号" prop="telephone">
|
<nut-form-item label="手机号" prop="telephone">
|
||||||
<nut-input v-model="formData.telephone" placeholder="请输入手机号" type="text" />
|
<nut-input v-model="formData.telephone" placeholder="请输入手机号" type="text" />
|
||||||
</nut-form-item>
|
</nut-form-item>
|
||||||
<nut-form-item label="文化程度" prop="educationLevel">
|
|
||||||
<view @click="showBottom = true" >
|
|
||||||
{{educationLevelValue?educationLevelValue:'请选择文化程度'}}
|
|
||||||
</view>
|
|
||||||
</nut-form-item>
|
|
||||||
<nut-form-item label="籍贯" prop="nativePlace">
|
<nut-form-item label="籍贯" prop="nativePlace">
|
||||||
<nut-input v-model="formData.nativePlace" placeholder="请输入籍贯" type="text" />
|
<nut-input v-model="formData.nativePlace" placeholder="请输入籍贯" type="text" />
|
||||||
</nut-form-item>
|
</nut-form-item>
|
||||||
|
@ -76,25 +71,12 @@
|
||||||
<nut-dialog content="详情" v-model:visible="visible" @ok="onOk" @cancel="cancel">
|
<nut-dialog content="详情" v-model:visible="visible" @ok="onOk" @cancel="cancel">
|
||||||
<slot>
|
<slot>
|
||||||
<view style="margin-bottom: 5px">
|
<view style="margin-bottom: 5px">
|
||||||
<view>姓名:{{ securityNumberByIdCard?.name ? securityNumberByIdCard.name : '无' }}</view>
|
<view>姓名:{{ securityNumberByIdCard.name ? securityNumberByIdCard.name : '无' }}</view>
|
||||||
<view>保安证件号:{{ securityNumberByIdCard?.bayzh ? securityNumberByIdCard?.bayzh : '无' }}</view>
|
<view>保安证件号:{{ securityNumberByIdCard?.bayzh ? securityNumberByIdCard?.bayzh : '无' }}</view>
|
||||||
<view>身份证:{{ securityNumberByIdCard?.sfzhm ? securityNumberByIdCard?.sfzhm : '无' }}</view>
|
<view>身份证:{{ securityNumberByIdCard?.sfzhm ? securityNumberByIdCard?.sfzhm : '无' }}</view>
|
||||||
</view>
|
</view>
|
||||||
</slot>
|
</slot>
|
||||||
</nut-dialog>
|
</nut-dialog>
|
||||||
<nut-popup v-model:visible="showBottom" position="bottom" :style="{ height: '40%' }">
|
|
||||||
<nut-picker
|
|
||||||
:columns="columns"
|
|
||||||
:field-names="{
|
|
||||||
text: 'label',
|
|
||||||
value: 'value',
|
|
||||||
children: 'extData'
|
|
||||||
}"
|
|
||||||
title="学历选择"
|
|
||||||
@confirm="confirm"
|
|
||||||
@cancel="showBottom = false"
|
|
||||||
/>
|
|
||||||
</nut-popup>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
@ -113,7 +95,6 @@ const SEX: any = enumSelectNodes('Sex')
|
||||||
const minioBaseUrl = process.env.TARO_APP_MINIO_URL
|
const minioBaseUrl = process.env.TARO_APP_MINIO_URL
|
||||||
const BUCKET = process.env.TARO_APP_MINIO_BUCKET
|
const BUCKET = process.env.TARO_APP_MINIO_BUCKET
|
||||||
const showPicker = ref(false)
|
const showPicker = ref(false)
|
||||||
const showBottom = ref(false)
|
|
||||||
const Url = ref('')
|
const Url = ref('')
|
||||||
const type = ref<'formInput' | 'QcCodeInput'>(null!)
|
const type = ref<'formInput' | 'QcCodeInput'>(null!)
|
||||||
const formData = ref<SecurityUserFormParams>({} as any)
|
const formData = ref<SecurityUserFormParams>({} as any)
|
||||||
|
@ -122,8 +103,6 @@ const visible = ref<boolean>(false)
|
||||||
const securityNumberByIdCard = ref<securityNumberByIdCard | any>()
|
const securityNumberByIdCard = ref<securityNumberByIdCard | any>()
|
||||||
const uploadRef = ref<any>(null)
|
const uploadRef = ref<any>(null)
|
||||||
const modelValue = ref('')
|
const modelValue = ref('')
|
||||||
const columns: any = enumSelectNodes('EducationLevel')
|
|
||||||
|
|
||||||
|
|
||||||
const rules: FormRules = {
|
const rules: FormRules = {
|
||||||
name: [{ required: true, message: '请输入姓名' }],
|
name: [{ required: true, message: '请输入姓名' }],
|
||||||
|
@ -136,23 +115,11 @@ const rules: FormRules = {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
telephone: [{ required: true, message: '请输入手机号' }],
|
telephone: [{ required: true, message: '请输入手机号' }],
|
||||||
educationLevel:[{required: true, message: '请选择文化程度'}]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const educationLevelValue = ref('')
|
|
||||||
// 文化程度
|
|
||||||
const confirm = ({selectedOptions}) => {
|
|
||||||
Object.keys(selectedOptions).forEach((item:any,index:number)=>{
|
|
||||||
console.log(item)
|
|
||||||
educationLevelValue.value = selectedOptions[index].label
|
|
||||||
formData.value.educationLevel = selectedOptions[index].value
|
|
||||||
})
|
|
||||||
showBottom.value = false
|
|
||||||
}
|
|
||||||
useLoad((options) => {
|
useLoad((options) => {
|
||||||
type.value = options.type
|
type.value = options.type
|
||||||
if (type.value === 'QcCodeInput') {
|
if (type.value === 'QcCodeInput') {
|
||||||
console.log(1111)
|
|
||||||
formData.value = {
|
formData.value = {
|
||||||
name: '',
|
name: '',
|
||||||
serviceProjectId: options.pid,
|
serviceProjectId: options.pid,
|
||||||
|
@ -163,16 +130,13 @@ useLoad((options) => {
|
||||||
dateOfBirth: null,
|
dateOfBirth: null,
|
||||||
noSecurityNumberDesc: options.noSecurityNumberDesc,
|
noSecurityNumberDesc: options.noSecurityNumberDesc,
|
||||||
photo: '',
|
photo: '',
|
||||||
educationLevel: ''
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const form = JSON.parse(options.securityUser)
|
const form = JSON.parse(options.securityUser)
|
||||||
educationLevelValue.value = form.educationLevel.label
|
|
||||||
formData.value = Object.assign({}, form, {
|
formData.value = Object.assign({}, form, {
|
||||||
idCard: form.idCard.originalValue,
|
idCard: form.idCard.originalValue,
|
||||||
telephone: form.telephone.originalValue,
|
telephone: form.telephone.originalValue,
|
||||||
photo: form.photo,
|
photo: form.photo
|
||||||
educationLevel: form.educationLevel.value
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -280,7 +244,6 @@ const submit = () => {
|
||||||
} else {
|
} else {
|
||||||
url = '/mp/user/qrCodeFormInputSecurityUser'
|
url = '/mp/user/qrCodeFormInputSecurityUser'
|
||||||
}
|
}
|
||||||
console.log(formData.value)
|
|
||||||
const resp = await api.post(url, formData.value)
|
const resp = await api.post(url, formData.value)
|
||||||
Taro.showToast({
|
Taro.showToast({
|
||||||
title: resp.message,
|
title: resp.message,
|
||||||
|
@ -304,9 +267,7 @@ const submit = () => {
|
||||||
homeAddress: '',
|
homeAddress: '',
|
||||||
noSecurityNumberDesc: '',
|
noSecurityNumberDesc: '',
|
||||||
photo: '',
|
photo: '',
|
||||||
educationLevel: ''
|
|
||||||
}
|
}
|
||||||
educationLevelValue.value = ''
|
|
||||||
uploadRef.value?.clearUploadQueue()
|
uploadRef.value?.clearUploadQueue()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -62,9 +62,5 @@ export interface ServiceProjectSecurityUserPagerVo {
|
||||||
snowFlakeId: string;
|
snowFlakeId: string;
|
||||||
workPost?: string;
|
workPost?: string;
|
||||||
sex: BaseEnum<number>
|
sex: BaseEnum<number>
|
||||||
educationLevel:{
|
|
||||||
label:string,
|
|
||||||
value:string
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,7 @@ export interface SecurityUserFormParams {
|
||||||
photo?:string;
|
photo?:string;
|
||||||
remark?: string;
|
remark?: string;
|
||||||
noSecurityNumberDesc:string;
|
noSecurityNumberDesc:string;
|
||||||
homeAddress?: string;
|
homeAddress?: string
|
||||||
educationLevel:string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface value{
|
export interface value{
|
||||||
|
|
Loading…
Reference in New Issue