|
|
|
@ -19,7 +19,7 @@
|
|
|
|
} from '@/api'
|
|
|
|
} from '@/api'
|
|
|
|
import $api from '@/api/api.js'
|
|
|
|
import $api from '@/api/api.js'
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
onShow
|
|
|
|
onShow,onLoad
|
|
|
|
} from '@dcloudio/uni-app'
|
|
|
|
} from '@dcloudio/uni-app'
|
|
|
|
|
|
|
|
|
|
|
|
const $props = defineProps({
|
|
|
|
const $props = defineProps({
|
|
|
|
@ -33,6 +33,9 @@
|
|
|
|
UserPersonCount()
|
|
|
|
UserPersonCount()
|
|
|
|
UserPersonInfo()
|
|
|
|
UserPersonInfo()
|
|
|
|
setTitle()
|
|
|
|
setTitle()
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
onLoad(()=>{
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
//设置灰度
|
|
|
|
//设置灰度
|
|
|
|
const SysGreyType = ref(0)
|
|
|
|
const SysGreyType = ref(0)
|
|
|
|
@ -137,8 +140,15 @@
|
|
|
|
const user_person_info = ref(JSON.parse(JSON.stringify(default_user_person_info)))
|
|
|
|
const user_person_info = ref(JSON.parse(JSON.stringify(default_user_person_info)))
|
|
|
|
const UserPersonInfo = async () => {
|
|
|
|
const UserPersonInfo = async () => {
|
|
|
|
if (Number($props.id) === 0) {
|
|
|
|
if (Number($props.id) === 0) {
|
|
|
|
user_person_info.value = JSON.parse(JSON.stringify(default_user_person_info))
|
|
|
|
let info =uni.getStorageSync('edit_person_info')
|
|
|
|
|
|
|
|
if(info){
|
|
|
|
|
|
|
|
user_person_info.value=info
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
user_person_info.value = JSON.parse(JSON.stringify(default_user_person_info))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
uni.removeStorageSync('edit_person_info');
|
|
|
|
const response = await UserPersonInfoAction({
|
|
|
|
const response = await UserPersonInfoAction({
|
|
|
|
id: Number($props.id)
|
|
|
|
id: Number($props.id)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
@ -188,6 +198,16 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
watch(
|
|
|
|
|
|
|
|
() => user_person_info.value,
|
|
|
|
|
|
|
|
(newVal, oldVal) => {
|
|
|
|
|
|
|
|
if(user_person_info.value.id===0){
|
|
|
|
|
|
|
|
uni.setStorageSync('edit_person_info', user_person_info.value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{ deep: true } // 👈 加上 deep: true
|
|
|
|
|
|
|
|
);
|
|
|
|
const birthday_ref = ref(null)
|
|
|
|
const birthday_ref = ref(null)
|
|
|
|
const birthdayRef = (e) => {
|
|
|
|
const birthdayRef = (e) => {
|
|
|
|
birthday_ref.value = e
|
|
|
|
birthday_ref.value = e
|
|
|
|
@ -227,6 +247,7 @@
|
|
|
|
await UserPersonCreateAction(user_person_info.value) :
|
|
|
|
await UserPersonCreateAction(user_person_info.value) :
|
|
|
|
await UserPersonUpdateAction(user_person_info.value)
|
|
|
|
await UserPersonUpdateAction(user_person_info.value)
|
|
|
|
$response(response, () => {
|
|
|
|
$response(response, () => {
|
|
|
|
|
|
|
|
uni.removeStorageSync('edit_person_info');
|
|
|
|
uni.navigateBack({
|
|
|
|
uni.navigateBack({
|
|
|
|
delta: 1
|
|
|
|
delta: 1
|
|
|
|
})
|
|
|
|
})
|
|
|
|
@ -266,6 +287,8 @@
|
|
|
|
user_person_info.value.id_number = filteredValue;
|
|
|
|
user_person_info.value.id_number = filteredValue;
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<view :class="SysGreyType==1? 'grey' :''">
|
|
|
|
<view :class="SysGreyType==1? 'grey' :''">
|
|
|
|
|