|
@@ -125,11 +125,17 @@ const submit = async () => {
|
|
if (!valid) return
|
|
if (!valid) return
|
|
formData.value.enterpriseId = searchData.value.enterprise.find(e => e.value === formData.value.enterpriseName)?.key
|
|
formData.value.enterpriseId = searchData.value.enterprise.find(e => e.value === formData.value.enterpriseName)?.key
|
|
formData.value.positionId = searchData.value.position.find(e => e.nameCn === formData.value.positionName)?.id
|
|
formData.value.positionId = searchData.value.position.find(e => e.nameCn === formData.value.positionName)?.id
|
|
- formData.value.startTime = convertYearMonthToTimestamp(formData.value.startTime)
|
|
|
|
- formData.value.endTime = sofar.value.length ? null : convertYearMonthToTimestamp(formData.value.endTime)
|
|
|
|
- if (!formData.value.endTime && !sofar.value.length) return uni.showToast({ icon: 'none', title: '请选择结束时间' })
|
|
|
|
|
|
+
|
|
|
|
+ const startTime = convertYearMonthToTimestamp(formData.value.startTime)
|
|
|
|
+ const endTime = sofar.value.length ? null : convertYearMonthToTimestamp(formData.value.endTime)
|
|
|
|
+ if (!endTime && !sofar.value.length) return uni.showToast({ icon: 'none', title: '请选择结束时间' })
|
|
|
|
+ if (endTime && startTime > endTime) {
|
|
|
|
+ uni.showToast({ icon: 'none', title: '开始时间不能大于结束时间' })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
try {
|
|
try {
|
|
- await saveResumeWorkExp(formData.value)
|
|
|
|
|
|
+ await saveResumeWorkExp({ ...formData.value, startTime, endTime })
|
|
uni.showToast({
|
|
uni.showToast({
|
|
icon: 'success',
|
|
icon: 'success',
|
|
title: '保存成功'
|
|
title: '保存成功'
|