提交 8ccc2cf2 authored 作者: 王鹏飞's avatar 王鹏飞

chore: 修改推荐信

上级 5d4844c1
......@@ -9,7 +9,7 @@
"version": "3.0.14",
"license": "ISC",
"dependencies": {
"@ezijing/vue-form": "^2.3.15",
"@ezijing/vue-form": "^2.3.17",
"@vant/area-data": "^1.3.2",
"animate.css": "^4.1.0",
"axios": "^0.19.2",
......@@ -1218,9 +1218,9 @@
}
},
"node_modules/@ezijing/vue-form": {
"version": "2.3.15",
"resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.3.15.tgz",
"integrity": "sha512-SI3WPWxZbzVkYhOaiiIGjxlRf9Ii9VqPfzqHuzHoCigz3vC4x/BXkZS0dUTyK9F3jvWpU1AQxCBxsAvsiEbSGg==",
"version": "2.3.17",
"resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.3.17.tgz",
"integrity": "sha512-6Jza4lZWQ8fHIQZHhQUt2YdM42OX8MffYefWUgKR/LT/nxO/NiAvWgP5Prek5WR7RmNSMmZk0+V11BDc5RXWRA==",
"dependencies": {
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
"@vue/babel-preset-jsx": "^1.1.2",
......@@ -15341,9 +15341,9 @@
}
},
"@ezijing/vue-form": {
"version": "2.3.15",
"resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.3.15.tgz",
"integrity": "sha512-SI3WPWxZbzVkYhOaiiIGjxlRf9Ii9VqPfzqHuzHoCigz3vC4x/BXkZS0dUTyK9F3jvWpU1AQxCBxsAvsiEbSGg==",
"version": "2.3.17",
"resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.3.17.tgz",
"integrity": "sha512-6Jza4lZWQ8fHIQZHhQUt2YdM42OX8MffYefWUgKR/LT/nxO/NiAvWgP5Prek5WR7RmNSMmZk0+V11BDc5RXWRA==",
"requires": {
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
"@vue/babel-preset-jsx": "^1.1.2",
......
......@@ -71,7 +71,7 @@
"webpack-merge": "^4.2.2"
},
"dependencies": {
"@ezijing/vue-form": "^2.3.15",
"@ezijing/vue-form": "^2.3.17",
"@vant/area-data": "^1.3.2",
"animate.css": "^4.1.0",
"axios": "^0.19.2",
......
......@@ -13,16 +13,12 @@ export default function(_this) {
get: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${window.PROJECT_ID}`,
callback(data) {
const {
basic_info: basicInfo = {},
attachments = [],
submission_stage: submissionStage = 'FILLING'
} = data.data.material
const { basic_info: basicInfo = {}, attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING'
const attachment = attachments.reduce(
(result, item) => {
const types = ['ID_CARD_FRONT', 'ID_CARD_BACK', 'HK_ID_CARD', 'PASSPORT', 'OTHER_ID_CARD_PHOTO']
const types = ['ID_CARD_FRONT', 'ID_CARD_BACK', 'HK_ID_CARD', 'PASSPORT', 'OTHER_ID_CARD_PHOTO', 'DIPLOMA_CN']
types.forEach(type => {
if (item.file_type_id === type) {
result[type].push(item)
......@@ -30,7 +26,7 @@ export default function(_this) {
})
return result
},
{ ID_CARD_FRONT: [], ID_CARD_BACK: [], HK_ID_CARD: [], PASSPORT: [], OTHER_ID_CARD_PHOTO: [] }
{ ID_CARD_FRONT: [], ID_CARD_BACK: [], HK_ID_CARD: [], PASSPORT: [], OTHER_ID_CARD_PHOTO: [], DIPLOMA_CN: [] }
)
basicInfo.id_type = basicInfo.id_type === '护照' ? '中国护照' : basicInfo.id_type
return Object.assign({}, basicInfo, attachment)
......@@ -159,6 +155,20 @@ export default function(_this) {
isShow(data) {
return data.id_type === '其他'
}
},
// 毕业证书
{
type: 'v-upload',
label: '毕业证书',
model: 'DIPLOMA_CN',
attrs: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${window.PROJECT_ID}/put`,
deleteAction: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${window.PROJECT_ID}/delete`,
data: { file_type: 'DIPLOMA_CN' },
limit: 1,
accept: 'image/*'
},
rules: [{ type: 'array', required: true, message: '请上传毕业证书', trigger: 'change' }]
}
]
}
......
......@@ -15,16 +15,12 @@ export default function(_this) {
get: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${window.PROJECT_ID}`,
callback(data) {
const {
basic_info: basicInfo = {},
attachments = [],
submission_stage: submissionStage = 'FILLING'
} = data.data.material
const { basic_info: basicInfo = {}, attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING'
const attachment = attachments.reduce(
(result, item) => {
const types = ['ID_CARD_FRONT', 'ID_CARD_BACK', 'HK_ID_CARD', 'PASSPORT', 'OTHER_ID_CARD_PHOTO']
const types = ['ID_CARD_FRONT', 'ID_CARD_BACK', 'HK_ID_CARD', 'PASSPORT', 'OTHER_ID_CARD_PHOTO', 'DIPLOMA_CN']
types.forEach(type => {
if (item.file_type_id === type) {
result[type].push(item)
......@@ -32,7 +28,7 @@ export default function(_this) {
})
return result
},
{ ID_CARD_FRONT: [], ID_CARD_BACK: [], HK_ID_CARD: [], PASSPORT: [], OTHER_ID_CARD_PHOTO: [] }
{ ID_CARD_FRONT: [], ID_CARD_BACK: [], HK_ID_CARD: [], PASSPORT: [], OTHER_ID_CARD_PHOTO: [], DIPLOMA_CN: [] }
)
basicInfo.id_type = basicInfo.id_type === '护照' ? '中国护照' : basicInfo.id_type
return Object.assign({ address_province: '', address_city: '' }, basicInfo, attachment)
......@@ -182,6 +178,20 @@ export default function(_this) {
return data.id_type === '其他'
}
},
// 毕业证书
{
type: 'v-upload',
label: '毕业证书',
model: 'DIPLOMA_CN',
attrs: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${window.PROJECT_ID}/put`,
deleteAction: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${window.PROJECT_ID}/delete`,
data: { file_type: 'DIPLOMA_CN' },
limit: 1,
accept: 'image/*'
},
rules: [{ type: 'array', required: true, message: '请上传毕业证书', trigger: 'change' }]
},
{
type: 'v-input',
label: '证件号码',
......
import byzs from './byzs'
// import byzs from './byzs'
import tjx from './tjx'
// import xwzs from './xwzs'
// import ywjl from './ywjl'
......@@ -9,6 +9,11 @@ export default function(_this) {
return {
id: 'interview',
title: '申请面试',
children: [byzs(_this), tjx(_this), cjd(_this), zp(_this)]
children: [
// byzs(_this),
tjx(_this),
cjd(_this),
zp(_this)
]
}
}
......@@ -9,21 +9,8 @@ export default function(_this) {
get: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${window.PROJECT_ID}`,
callback(data) {
const {
submission_stage: submissionStage = 'FILLING',
reco_letters: list = [],
attachments = []
} = data.data.material
const stageList = [
'FILLING',
'PREPAYMENT',
'INTERVIEW_APPLICATION',
'AUDITION',
'INTERVIEW',
'PAYMENT',
'REGISTRATION',
'CLOSED'
]
const { submission_stage: submissionStage = 'FILLING', reco_letters: list = [], attachments = [] } = data.data.material
const stageList = ['FILLING', 'PREPAYMENT', 'INTERVIEW_APPLICATION', 'AUDITION', 'INTERVIEW', 'PAYMENT', 'REGISTRATION', 'CLOSED']
this.form.options.disabled = stageList.findIndex(item => item === submissionStage) > 2
const attachment = attachments.reduce(
(result, item) => {
......@@ -39,14 +26,16 @@ export default function(_this) {
{ RECOMMENDATION_LETTER: [] }
)
// this.form.options.disabled = list.length >= 2
return list.length
? list.map(item => Object.assign({}, item, attachment))
: [{ ...attachment }, { ...attachment }]
return list.length ? list.map(item => Object.assign({}, item, attachment)) : [{ ...attachment }, { ...attachment }]
}
},
update: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${window.PROJECT_ID}/put`,
beforeRequest(data) {
const [first = {}] = data
if (first.RECOMMENDATION_LETTER && first.RECOMMENDATION_LETTER.length) {
return {}
}
const letters = data.map(item => {
delete item.RECOMMENDATION_LETTER
return item
......@@ -66,10 +55,11 @@ export default function(_this) {
},
form: {
minlength: 2,
prev: { to: { query: { active: 'interview_byzs' } }, isSubmit: true },
// prev: { to: { query: { active: 'interview_byzs' } }, isSubmit: true },
next: { to: { query: { active: 'interview_cjd' } }, isSubmit: true },
hasAdd: true,
// hasAdd: true,
options: { disabled: false, labelWidth: '140px' },
hint: '<p style="color:#999">以下内容可选其一,填写两个推荐人的信息或者上传两张推荐信照片。</p>',
disabled(data) {
return !!data.letter_content
},
......@@ -110,38 +100,29 @@ export default function(_this) {
type: 'v-input',
label: '推荐人姓名',
model: 'provider_name',
attrs: { placeholder: '请输入推荐人姓名' },
rules: [{ required: true, message: '请输入推荐人姓名', trigger: 'blur' }]
attrs: { placeholder: '请输入推荐人姓名' }
// rules: [{ message: '请输入推荐人姓名', trigger: 'blur' }]
},
{
type: 'v-input',
label: '推荐人电话',
model: 'provider_phone_number',
attrs: { placeholder: '请输入推荐人电话', maxlength: 11 },
rules: [{ required: true, pattern: /^1[3-9]\d{9}$/, message: '请输入推荐人电话', trigger: 'blur' }]
rules: [{ pattern: /^1[3-9]\d{9}$/, message: '请输入推荐人电话', trigger: 'change' }]
},
{
type: 'v-input',
label: '推荐人邮箱',
model: 'provider_email',
attrs: { placeholder: '请输入推荐人邮箱' },
rules: [{ type: 'email', required: true, message: '请输入推荐人邮箱', trigger: 'blur' }]
rules: [{ type: 'email', message: '请输入推荐人邮箱', trigger: 'change' }]
},
{
type: 'v-select',
values: [
{ value: '老师/导师' },
{ value: '领导' },
{ value: '同学' },
{ value: '同事' },
{ value: '亲属' },
{ value: '朋友' },
{ value: '其他' }
],
values: [{ value: '老师/导师' }, { value: '领导' }, { value: '同学' }, { value: '同事' }, { value: '亲属' }, { value: '朋友' }, { value: '其他' }],
label: '与推荐人关系',
model: 'provider_relationship',
rules: [{ required: true, message: '请选择与推荐人关系', trigger: 'change' }]
rules: [{ message: '请选择与推荐人关系', trigger: 'change' }]
}
],
appendItems: [
......
......@@ -18,13 +18,7 @@
</template>
</vue-form>
<app-complete :type="1" v-model="completeVisible"></app-complete>
<el-dialog
title="您的申请资料已提交成功"
:visible.sync="dialogVisible"
:center="true"
:close-on-click-modal="false"
width="348px"
>
<el-dialog title="您的申请资料已提交成功" :visible.sync="dialogVisible" :center="true" :close-on-click-modal="false" width="348px">
<div class="dialog-tips">
<div class="icon"><img src="https://webapp-pub.ezijing.com/project/application/images/icon_success.png" /></div>
</div>
......@@ -47,7 +41,7 @@ export default {
const menus = getMenu(this)
return {
menus: [menus],
currentActive: 'interview_byzs',
currentActive: 'interview_tjx',
completeVisible: false,
dialogVisible: false,
detail: null
......@@ -58,7 +52,7 @@ export default {
immediate: true,
handler(route) {
const { query = {} } = route
this.currentActive = query.active || 'interview_byzs'
this.currentActive = query.active || 'interview_tjx'
}
},
showSubmitedDialog(value) {
......@@ -67,23 +61,14 @@ export default {
},
computed: {
isSubmited() {
const stageList = [
'FILLING',
'PREPAYMENT',
'INTERVIEW_APPLICATION',
'AUDITION',
'INTERVIEW',
'PAYMENT',
'REGISTRATION',
'CLOSED'
]
const stageList = ['FILLING', 'PREPAYMENT', 'INTERVIEW_APPLICATION', 'AUDITION', 'INTERVIEW', 'PAYMENT', 'REGISTRATION', 'CLOSED']
if (this.detail) {
return stageList.findIndex(item => item === this.detail.material.submission_stage) > 2
}
return false
},
showSubmitedDialog() {
return this.isSubmited && this.currentActive === 'interview_byzs'
return this.isSubmited && this.currentActive === 'interview_tjx'
},
user() {
return this.$store.state.user
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论