diff --git a/src/api/lb-department-user.js b/src/api/lb-department-user.js index b2b2af6..0d9acdb 100644 --- a/src/api/lb-department-user.js +++ b/src/api/lb-department-user.js @@ -59,7 +59,8 @@ export function getLbDepartmentUserTree(params) { return request({ url: '/lbDepartmentUser/tree', method: 'get', - params + params, + timeout: 160000 }) } diff --git a/src/views/lb-business/assessment-apply/index.vue b/src/views/lb-business/assessment-apply/index.vue index 0baa5ff..a6c612c 100644 --- a/src/views/lb-business/assessment-apply/index.vue +++ b/src/views/lb-business/assessment-apply/index.vue @@ -28,6 +28,7 @@ + @@ -130,6 +131,11 @@ + + + + + @@ -304,7 +310,6 @@ export default { { label: '陈晓琴老师', value: '陈晓琴老师' }, { label: '李军A老师', value: '李军A老师' }, { label: '刘伟翔老师', value: '刘伟翔老师' }, - { label: '李家让老师', value: '李家让老师' }, { label: '张伟老师', value: '张伟老师' }, { label: '林显竹老师', value: '林显竹老师' }, { label: '袁慧榕老师', value: '袁慧榕老师' } @@ -329,6 +334,7 @@ export default { }, form: { id: '', + sortedNum: '', applicantName: '', applicantPhone: '', applicantAge: undefined, @@ -393,9 +399,19 @@ export default { const s = String(v).replace('T', ' ') return s.length >= 19 ? s.slice(0, 19) : s }, + normalizeFormNumber(value) { + if (value === undefined || value === null || value === '') return undefined + const n = Number(value) + return Number.isNaN(n) ? undefined : n + }, + normalizeFormString(value) { + if (value === undefined || value === null) return '' + return String(value).trim() + }, applyParsedEntityToForm(entity) { if (!entity || typeof entity !== 'object') return const keys = [ + 'sortedNum', 'applicantName', 'applicantPhone', 'applicantAge', @@ -413,12 +429,11 @@ export default { const v = entity[k] if (v === undefined || v === null) return if (k === 'applicantAge') { - if (v === '') { - this.form.applicantAge = undefined - return - } - const n = Number(v) - this.form.applicantAge = Number.isNaN(n) ? undefined : n + this.$set(this.form, k, this.normalizeFormNumber(v)) + return + } + if (k === 'sortedNum') { + this.form[k] = this.normalizeFormString(v) return } if (k === 'applicationDatetime') { @@ -657,11 +672,12 @@ export default { this.dialogTitle = '编辑评估申请' this.isEdit = true this.assessmentApplyText = '' - this.form = { + Object.assign(this.form, { id: row.id || '', + sortedNum: this.normalizeFormString(row.sortedNum), applicantName: row.applicantName || '', applicantPhone: row.applicantPhone || '', - applicantAge: row.applicantAge === null || row.applicantAge === undefined ? undefined : Number(row.applicantAge), + applicantAge: this.normalizeFormNumber(row.applicantAge), workExperience: row.workExperience || '', colleagueName: row.colleagueName || '', colleaguePhone: row.colleaguePhone || '', @@ -671,7 +687,7 @@ export default { moderatorName: row.moderatorName || '', assessmentTeacherName: row.assessmentTeacherName || '', meetingNumber: row.meetingNumber || '' - } + }) this.dialogVisible = true this.$nextTick(() => { this.$refs.dataForm && this.$refs.dataForm.clearValidate() @@ -711,9 +727,10 @@ export default { }, buildPayload() { const payload = { + sortedNum: this.normalizeFormString(this.form.sortedNum) || undefined, applicantName: this.form.applicantName, applicantPhone: this.form.applicantPhone, - applicantAge: this.form.applicantAge, + applicantAge: this.normalizeFormNumber(this.form.applicantAge), workExperience: this.form.workExperience || undefined, colleagueName: this.form.colleagueName || undefined, colleaguePhone: this.form.colleaguePhone || undefined, @@ -726,7 +743,7 @@ export default { } if (this.isEdit) payload.id = this.form.id Object.keys(payload).forEach((key) => { - if (payload[key] === undefined || payload[key] === '') delete payload[key] + if (payload[key] === undefined || payload[key] === null || payload[key] === '') delete payload[key] }) return payload }, @@ -738,6 +755,7 @@ export default { this.assessmentApplyText = '' this.form = { id: '', + sortedNum: '', applicantName: '', applicantPhone: '', applicantAge: undefined, diff --git a/src/views/lb-business/purchase-apply/index.vue b/src/views/lb-business/purchase-apply/index.vue index 4908063..2eb69b5 100644 --- a/src/views/lb-business/purchase-apply/index.vue +++ b/src/views/lb-business/purchase-apply/index.vue @@ -77,9 +77,7 @@ 特权开通日期 推荐人 手机号 - 领导人 - 开通日期 - 系统到期日期 + 组长 操作 @@ -100,8 +98,6 @@ {{ row.colleagueName || '-' }} {{ row.colleaguePhone || '-' }} {{ row.teamLeader || '-' }} - {{ formatOpenDate(row.applyDate) }} - {{ formatApplicantSystemExpireDate(row) }} 编辑 删除 @@ -269,7 +265,7 @@ {{ row.applyPhone || '-' }} {{ formatTryDate(row.tryDate) }} - {{ formatOpenDate(row.applyDate) }} + {{ formatApplyOpenDate(row.applyDate) }} {{ formatApplicantSystemExpireDate(row) }} {{ formatLatestTradePayTime(row) }} {{ formatLatestTradeTotalMoney(row) }} @@ -632,7 +628,7 @@ 特权开通日期 推荐人 手机号 - 领导人 + 组长 开通日期 @@ -653,7 +649,7 @@ {{ row.colleagueName || '-' }} {{ row.colleaguePhone || '-' }} {{ row.teamLeader || '-' }} - {{ formatOpenDate(row.applyDate) }} + {{ formatApplyOpenDate(row.applyDate) }} @@ -884,6 +880,23 @@ export default { const day = String(date.getDate()).padStart(2, '0') return `${year}-${month}-${day}` }, + addOneWeekday(dateValue) { + const normalized = this.normalizeApplyDateValue(dateValue) + if (!normalized) return '' + const date = new Date(`${normalized}T12:00:00`) + if (Number.isNaN(date.getTime())) return normalized + date.setDate(date.getDate() + 1) + const dayOfWeek = date.getDay() + if (dayOfWeek === 6) { + date.setDate(date.getDate() + 2) + } else if (dayOfWeek === 0) { + date.setDate(date.getDate() + 1) + } + const year = date.getFullYear() + const month = String(date.getMonth() + 1).padStart(2, '0') + const day = String(date.getDate()).padStart(2, '0') + return `${year}-${month}-${day}` + }, formatShortMd(dateValue, padMonthDay = true) { const normalized = this.normalizeApplyDateValue(dateValue) if (!normalized) return '' @@ -940,6 +953,11 @@ export default { if (Number.isNaN(month) || Number.isNaN(day)) return normalized return `${year}/${month}/${day}` }, + formatApplyOpenDate(applyDate) { + const shifted = this.addOneWeekday(applyDate) + if (!shifted) return '-' + return this.formatOpenDate(shifted) + }, fetchList() { this.loading = true getLbPurchaseApplyList(this.buildListParams())