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

chore: 修改推荐信

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