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