Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
jgdl
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-08-08 12:49:06 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
61a51f4535e226c9093dc11c2fb1bced1578a149
61a51f45
1 parent
d71f4242
feat(证件有效期): 添加证件有效期结束类型选择功能
新增证件有效期结束类型选择弹窗,支持选择"长期"或"选择日期"选项
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
1 deletions
src/pages/collectionSettings/index.vue
src/pages/collectionSettings/index.vue
View file @
61a51f4
...
...
@@ -294,6 +294,20 @@
/>
</nut-popup>
<!-- 证件有效期结束类型选择器弹窗 -->
<nut-popup
v-model:visible="showEndDateTypeModal"
position="bottom"
>
<nut-picker
v-model="endDateTypePickerValue"
:columns="endDateTypeOptions"
title="选择证件有效期类型"
@confirm="onEndDateTypeConfirm"
@cancel="showEndDateTypeModal = false"
></nut-picker>
</nut-popup>
<!-- 身份证有效期结束日期选择器 -->
<nut-popup
v-model:visible="showIdcardEndDate"
...
...
@@ -400,6 +414,7 @@ const showIdentityModal = ref(false);
const showBankModal = ref(false);
const showIdcardBeginDate = ref(false);
const showIdcardEndDate = ref(false);
const showEndDateTypeModal = ref(false);
/**
* 身份证号码错误信息
...
...
@@ -426,6 +441,23 @@ const minYearDate = ref(new Date(currentYear - 80, 0, 1)); // 80年前的1月1
// 银行选择器当前选中的值
const bankPickerValue = ref([]);
// 证件有效期结束类型选择器当前选中的值
const endDateTypePickerValue = ref([]);
/**
* 证件有效期结束类型选项
*/
const endDateTypeOptions = ref([
{
text: '长期',
value: 'long_term'
},
{
text: '选择日期',
value: 'select_date'
}
]);
/**
* 银行列表数据(从接口获取)
*/
...
...
@@ -938,7 +970,11 @@ const showIdcardBeginDatePicker = () => {
* 显示身份证有效期结束日期选择器
*/
const showIdcardEndDatePicker = () => {
showIdcardEndDate.value = true
// 设置默认选中第一个选项
if (endDateTypeOptions.value.length > 0) {
endDateTypePickerValue.value = [endDateTypeOptions.value[0].value];
}
showEndDateTypeModal.value = true
}
/**
...
...
@@ -955,6 +991,24 @@ const onIdcardBeginDateConfirm = (param) => {
}
/**
* 证件有效期结束类型选择确认回调
* @param {Object} param - 选择器返回的参数
*/
const onEndDateTypeConfirm = ({ selectedValue }) => {
const selectedType = selectedValue[0];
if (selectedType === 'long_term') {
// 选择长期,直接设置为"长期"
tempIdentityInfo.value.idcard_effect_end = '长期';
showEndDateTypeModal.value = false;
} else if (selectedType === 'select_date') {
// 选择日期,打开日期选择器
showEndDateTypeModal.value = false;
showIdcardEndDate.value = true;
}
};
/**
* 确认选择身份证有效期结束日期
* @param {Object} param - 日期选择器返回的参数
*/
...
...
Please
register
or
login
to post a comment