调整进货申请列表
This commit is contained in:
@@ -59,7 +59,8 @@ export function getLbDepartmentUserTree(params) {
|
|||||||
return request({
|
return request({
|
||||||
url: '/lbDepartmentUser/tree',
|
url: '/lbDepartmentUser/tree',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params,
|
||||||
|
timeout: 160000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
<el-card class="table-container" shadow="never">
|
<el-card class="table-container" shadow="never">
|
||||||
<el-table v-loading="loading" :data="list" border class="assessment-apply-table" style="width: 100%">
|
<el-table v-loading="loading" :data="list" border class="assessment-apply-table" style="width: 100%">
|
||||||
|
<el-table-column label="序号" prop="sortedNum" min-width="72" />
|
||||||
<el-table-column label="申请人姓名" prop="applicantName" min-width="108" />
|
<el-table-column label="申请人姓名" prop="applicantName" min-width="108" />
|
||||||
<el-table-column label="申请人电话" prop="applicantPhone" min-width="126" />
|
<el-table-column label="申请人电话" prop="applicantPhone" min-width="126" />
|
||||||
<el-table-column label="同事姓名" prop="colleagueName" min-width="108" />
|
<el-table-column label="同事姓名" prop="colleagueName" min-width="108" />
|
||||||
@@ -130,6 +131,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="序号" prop="sortedNum">
|
||||||
|
<el-input v-model="form.sortedNum" clearable placeholder="请输入序号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="申请人" prop="applicantName">
|
<el-form-item label="申请人" prop="applicantName">
|
||||||
<el-input v-model="form.applicantName" placeholder="请输入申请人" />
|
<el-input v-model="form.applicantName" placeholder="请输入申请人" />
|
||||||
@@ -304,7 +310,6 @@ export default {
|
|||||||
{ label: '陈晓琴老师', value: '陈晓琴老师' },
|
{ label: '陈晓琴老师', value: '陈晓琴老师' },
|
||||||
{ label: '李军A老师', value: '李军A老师' },
|
{ label: '李军A老师', value: '李军A老师' },
|
||||||
{ label: '刘伟翔老师', value: '刘伟翔老师' },
|
{ label: '刘伟翔老师', value: '刘伟翔老师' },
|
||||||
{ label: '李家让老师', value: '李家让老师' },
|
|
||||||
{ label: '张伟老师', value: '张伟老师' },
|
{ label: '张伟老师', value: '张伟老师' },
|
||||||
{ label: '林显竹老师', value: '林显竹老师' },
|
{ label: '林显竹老师', value: '林显竹老师' },
|
||||||
{ label: '袁慧榕老师', value: '袁慧榕老师' }
|
{ label: '袁慧榕老师', value: '袁慧榕老师' }
|
||||||
@@ -329,6 +334,7 @@ export default {
|
|||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
id: '',
|
id: '',
|
||||||
|
sortedNum: '',
|
||||||
applicantName: '',
|
applicantName: '',
|
||||||
applicantPhone: '',
|
applicantPhone: '',
|
||||||
applicantAge: undefined,
|
applicantAge: undefined,
|
||||||
@@ -393,9 +399,19 @@ export default {
|
|||||||
const s = String(v).replace('T', ' ')
|
const s = String(v).replace('T', ' ')
|
||||||
return s.length >= 19 ? s.slice(0, 19) : s
|
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) {
|
applyParsedEntityToForm(entity) {
|
||||||
if (!entity || typeof entity !== 'object') return
|
if (!entity || typeof entity !== 'object') return
|
||||||
const keys = [
|
const keys = [
|
||||||
|
'sortedNum',
|
||||||
'applicantName',
|
'applicantName',
|
||||||
'applicantPhone',
|
'applicantPhone',
|
||||||
'applicantAge',
|
'applicantAge',
|
||||||
@@ -413,12 +429,11 @@ export default {
|
|||||||
const v = entity[k]
|
const v = entity[k]
|
||||||
if (v === undefined || v === null) return
|
if (v === undefined || v === null) return
|
||||||
if (k === 'applicantAge') {
|
if (k === 'applicantAge') {
|
||||||
if (v === '') {
|
this.$set(this.form, k, this.normalizeFormNumber(v))
|
||||||
this.form.applicantAge = undefined
|
return
|
||||||
return
|
}
|
||||||
}
|
if (k === 'sortedNum') {
|
||||||
const n = Number(v)
|
this.form[k] = this.normalizeFormString(v)
|
||||||
this.form.applicantAge = Number.isNaN(n) ? undefined : n
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (k === 'applicationDatetime') {
|
if (k === 'applicationDatetime') {
|
||||||
@@ -657,11 +672,12 @@ export default {
|
|||||||
this.dialogTitle = '编辑评估申请'
|
this.dialogTitle = '编辑评估申请'
|
||||||
this.isEdit = true
|
this.isEdit = true
|
||||||
this.assessmentApplyText = ''
|
this.assessmentApplyText = ''
|
||||||
this.form = {
|
Object.assign(this.form, {
|
||||||
id: row.id || '',
|
id: row.id || '',
|
||||||
|
sortedNum: this.normalizeFormString(row.sortedNum),
|
||||||
applicantName: row.applicantName || '',
|
applicantName: row.applicantName || '',
|
||||||
applicantPhone: row.applicantPhone || '',
|
applicantPhone: row.applicantPhone || '',
|
||||||
applicantAge: row.applicantAge === null || row.applicantAge === undefined ? undefined : Number(row.applicantAge),
|
applicantAge: this.normalizeFormNumber(row.applicantAge),
|
||||||
workExperience: row.workExperience || '',
|
workExperience: row.workExperience || '',
|
||||||
colleagueName: row.colleagueName || '',
|
colleagueName: row.colleagueName || '',
|
||||||
colleaguePhone: row.colleaguePhone || '',
|
colleaguePhone: row.colleaguePhone || '',
|
||||||
@@ -671,7 +687,7 @@ export default {
|
|||||||
moderatorName: row.moderatorName || '',
|
moderatorName: row.moderatorName || '',
|
||||||
assessmentTeacherName: row.assessmentTeacherName || '',
|
assessmentTeacherName: row.assessmentTeacherName || '',
|
||||||
meetingNumber: row.meetingNumber || ''
|
meetingNumber: row.meetingNumber || ''
|
||||||
}
|
})
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.dataForm && this.$refs.dataForm.clearValidate()
|
this.$refs.dataForm && this.$refs.dataForm.clearValidate()
|
||||||
@@ -711,9 +727,10 @@ export default {
|
|||||||
},
|
},
|
||||||
buildPayload() {
|
buildPayload() {
|
||||||
const payload = {
|
const payload = {
|
||||||
|
sortedNum: this.normalizeFormString(this.form.sortedNum) || undefined,
|
||||||
applicantName: this.form.applicantName,
|
applicantName: this.form.applicantName,
|
||||||
applicantPhone: this.form.applicantPhone,
|
applicantPhone: this.form.applicantPhone,
|
||||||
applicantAge: this.form.applicantAge,
|
applicantAge: this.normalizeFormNumber(this.form.applicantAge),
|
||||||
workExperience: this.form.workExperience || undefined,
|
workExperience: this.form.workExperience || undefined,
|
||||||
colleagueName: this.form.colleagueName || undefined,
|
colleagueName: this.form.colleagueName || undefined,
|
||||||
colleaguePhone: this.form.colleaguePhone || undefined,
|
colleaguePhone: this.form.colleaguePhone || undefined,
|
||||||
@@ -726,7 +743,7 @@ export default {
|
|||||||
}
|
}
|
||||||
if (this.isEdit) payload.id = this.form.id
|
if (this.isEdit) payload.id = this.form.id
|
||||||
Object.keys(payload).forEach((key) => {
|
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
|
return payload
|
||||||
},
|
},
|
||||||
@@ -738,6 +755,7 @@ export default {
|
|||||||
this.assessmentApplyText = ''
|
this.assessmentApplyText = ''
|
||||||
this.form = {
|
this.form = {
|
||||||
id: '',
|
id: '',
|
||||||
|
sortedNum: '',
|
||||||
applicantName: '',
|
applicantName: '',
|
||||||
applicantPhone: '',
|
applicantPhone: '',
|
||||||
applicantAge: undefined,
|
applicantAge: undefined,
|
||||||
|
|||||||
@@ -77,9 +77,7 @@
|
|||||||
<th>特权开通日期</th>
|
<th>特权开通日期</th>
|
||||||
<th>推荐人</th>
|
<th>推荐人</th>
|
||||||
<th>手机号</th>
|
<th>手机号</th>
|
||||||
<th>领导人</th>
|
<th>组长</th>
|
||||||
<th>开通日期</th>
|
|
||||||
<th>系统到期日期</th>
|
|
||||||
<th class="col-actions">操作</th>
|
<th class="col-actions">操作</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -100,8 +98,6 @@
|
|||||||
<td>{{ row.colleagueName || '-' }}</td>
|
<td>{{ row.colleagueName || '-' }}</td>
|
||||||
<td>{{ row.colleaguePhone || '-' }}</td>
|
<td>{{ row.colleaguePhone || '-' }}</td>
|
||||||
<td>{{ row.teamLeader || '-' }}</td>
|
<td>{{ row.teamLeader || '-' }}</td>
|
||||||
<td>{{ formatOpenDate(row.applyDate) }}</td>
|
|
||||||
<td>{{ formatApplicantSystemExpireDate(row) }}</td>
|
|
||||||
<td class="col-actions">
|
<td class="col-actions">
|
||||||
<el-button type="text" @click="handleEdit(row)">编辑</el-button>
|
<el-button type="text" @click="handleEdit(row)">编辑</el-button>
|
||||||
<el-button type="text" style="color:#F56C6C;" @click="handleDelete(row)">删除</el-button>
|
<el-button type="text" style="color:#F56C6C;" @click="handleDelete(row)">删除</el-button>
|
||||||
@@ -269,7 +265,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>{{ row.applyPhone || '-' }}</td>
|
<td>{{ row.applyPhone || '-' }}</td>
|
||||||
<td>{{ formatTryDate(row.tryDate) }}</td>
|
<td>{{ formatTryDate(row.tryDate) }}</td>
|
||||||
<td>{{ formatOpenDate(row.applyDate) }}</td>
|
<td>{{ formatApplyOpenDate(row.applyDate) }}</td>
|
||||||
<td>{{ formatApplicantSystemExpireDate(row) }}</td>
|
<td>{{ formatApplicantSystemExpireDate(row) }}</td>
|
||||||
<td>{{ formatLatestTradePayTime(row) }}</td>
|
<td>{{ formatLatestTradePayTime(row) }}</td>
|
||||||
<td>{{ formatLatestTradeTotalMoney(row) }}</td>
|
<td>{{ formatLatestTradeTotalMoney(row) }}</td>
|
||||||
@@ -632,7 +628,7 @@
|
|||||||
<th>特权开通日期</th>
|
<th>特权开通日期</th>
|
||||||
<th>推荐人</th>
|
<th>推荐人</th>
|
||||||
<th>手机号</th>
|
<th>手机号</th>
|
||||||
<th>领导人</th>
|
<th>组长</th>
|
||||||
<th>开通日期</th>
|
<th>开通日期</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -653,7 +649,7 @@
|
|||||||
<td>{{ row.colleagueName || '-' }}</td>
|
<td>{{ row.colleagueName || '-' }}</td>
|
||||||
<td>{{ row.colleaguePhone || '-' }}</td>
|
<td>{{ row.colleaguePhone || '-' }}</td>
|
||||||
<td>{{ row.teamLeader || '-' }}</td>
|
<td>{{ row.teamLeader || '-' }}</td>
|
||||||
<td>{{ formatOpenDate(row.applyDate) }}</td>
|
<td>{{ formatApplyOpenDate(row.applyDate) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</template>
|
</template>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -884,6 +880,23 @@ export default {
|
|||||||
const day = String(date.getDate()).padStart(2, '0')
|
const day = String(date.getDate()).padStart(2, '0')
|
||||||
return `${year}-${month}-${day}`
|
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) {
|
formatShortMd(dateValue, padMonthDay = true) {
|
||||||
const normalized = this.normalizeApplyDateValue(dateValue)
|
const normalized = this.normalizeApplyDateValue(dateValue)
|
||||||
if (!normalized) return ''
|
if (!normalized) return ''
|
||||||
@@ -940,6 +953,11 @@ export default {
|
|||||||
if (Number.isNaN(month) || Number.isNaN(day)) return normalized
|
if (Number.isNaN(month) || Number.isNaN(day)) return normalized
|
||||||
return `${year}/${month}/${day}`
|
return `${year}/${month}/${day}`
|
||||||
},
|
},
|
||||||
|
formatApplyOpenDate(applyDate) {
|
||||||
|
const shifted = this.addOneWeekday(applyDate)
|
||||||
|
if (!shifted) return '-'
|
||||||
|
return this.formatOpenDate(shifted)
|
||||||
|
},
|
||||||
fetchList() {
|
fetchList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getLbPurchaseApplyList(this.buildListParams())
|
getLbPurchaseApplyList(this.buildListParams())
|
||||||
|
|||||||
Reference in New Issue
Block a user