提交 23a05e31 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 0a4ac982
......@@ -13,11 +13,10 @@ export default function(_this) {
// wfzsm(_this),
{
id: 'application_pay',
title: '缴报名费'
// show: false,
// visible() {
// return _this.visible
// }
title: '缴报名费',
visible() {
return _this.visible
}
},
declare(_this)
]
......
......@@ -16,9 +16,9 @@ export default function(_this) {
profile(_this),
education(_this),
career(_this),
answer(_this),
training(_this),
honor(_this),
answer(_this),
attachment(_this)
]
}
......
......@@ -39,8 +39,8 @@ export default function(_this) {
}
},
form: {
prev: { to: { query: { active: 'application_info', tab: 'application_info_career' } }, isSubmit: true },
next: { to: { query: { active: 'application_info', tab: 'application_info_training' } }, isSubmit: true },
prev: { to: { query: { active: 'application_info', tab: 'application_info_honor' } }, isSubmit: true },
next: { to: { query: { active: 'application_info', tab: 'application_info_attachment' } }, isSubmit: true },
options: {},
items: [
{
......
......@@ -45,7 +45,7 @@ export default function(_this) {
}
},
form: {
prev: { to: { query: { active: 'application_info', tab: 'application_info_honor' } } },
prev: { to: { query: { active: 'application_info', tab: 'application_info_answer' } } },
next: { to: { query: { active: 'application_pay' } } },
hasButton: false,
options: { labelWidth: '140px' },
......
......@@ -41,7 +41,7 @@ export default function(_this) {
},
form: {
prev: { to: { query: { active: 'application_info', tab: 'application_info_education' } }, isSubmit: true },
next: { to: { query: { active: 'application_info', tab: 'application_info_answer' } }, isSubmit: true },
next: { to: { query: { active: 'application_info', tab: 'application_info_training' } }, isSubmit: true },
hasAdd: true,
options: { labelWidth: '140px' },
items: [
......@@ -146,8 +146,11 @@ export default function(_this) {
type: 'v-input',
label: '年薪收入(万元)',
model: 'annual_salary',
attrs: { placeholder: '请输入您的年薪收入', type: 'number', maxlength: '20' },
rules: [{ required: true, message: '请输入您的年薪收入', trigger: 'blur' }]
attrs: { placeholder: '请输入您的年薪收入', maxlength: '10' },
rules: [
{ required: true, message: '请输入您的年薪收入', trigger: 'blur' },
{ pattern: /^([0-9]*)+(.[0-9]*)?$/, message: '请输入数字', trigger: 'blur' }
]
},
{
type: 'v-input',
......
......@@ -31,7 +31,7 @@ export default function(_this) {
},
form: {
prev: { to: { query: { active: 'application_info', tab: 'application_info_training' } }, isSubmit: true },
next: { to: { query: { active: 'application_info', tab: 'application_info_attachment' } }, isSubmit: true },
next: { to: { query: { active: 'application_info', tab: 'application_info_answer' } }, isSubmit: true },
hasAdd: true,
options: { labelWidth: '140px' },
items: [
......
......@@ -219,7 +219,7 @@ export default function(_this) {
model: 'nationality',
values: country,
attrs: { placeholder: '请选择国籍', filterable: true },
rules: [{ required: true, message: '请选择国籍', trigger: 'blur' }]
rules: [{ required: true, message: '请选择国籍', trigger: 'change' }]
},
{
type: 'v-datepicker',
......
......@@ -30,7 +30,7 @@ export default function(_this) {
}
},
form: {
prev: { to: { query: { active: 'application_info', tab: 'application_info_answer' } }, isSubmit: true },
prev: { to: { query: { active: 'application_info', tab: 'application_info_career' } }, isSubmit: true },
next: { to: { query: { active: 'application_info', tab: 'application_info_honor' } }, isSubmit: true },
hasAdd: true,
options: { labelWidth: '140px' },
......
......@@ -91,6 +91,9 @@ export default {
},
// 检查支付状态
checkPay(order) {
if (!order || !order.id) {
return
}
const userId = this.user.id
api.checkPay(order.id, { user_id: userId }).then(response => {
if (response.data.payment_status === 'SUCCESS') {
......
......@@ -6,7 +6,7 @@
<template v-for="item in options">
<el-step
:title="item.title"
:status="progress.FILLING[item.code] && progress.FILLING[item.code].progress === 1 ? 'success' : 'error'"
:status="isSuccess(progress.FILLING[item.code], item) ? 'success' : 'error'"
:key="item.code"
></el-step>
</template>
......@@ -16,14 +16,14 @@
<template v-for="item in options">
<div
class="preview-item"
:class="progress.FILLING[item.code].progress === 1 ? 'is-success' : 'is-error'"
:class="isSuccess(progress.FILLING[item.code], item) ? 'is-success' : 'is-error'"
:key="item.code"
v-if="progress.FILLING[item.code]"
>
<div class="preview-item-hd">
<div class="title">
{{ item.title }}
<template v-if="progress.FILLING[item.code].progress === 1">(已完善)</template>
<template v-if="isSuccess(progress.FILLING[item.code], item)">(已完善)</template>
<template v-else>(待完善)</template>
</div>
<div class="line"></div>
......@@ -186,6 +186,7 @@ export default {
edit: {
to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_profile' } }
},
required: true,
items: [
{ label: '姓名', code: 'real_name_cn' },
{ label: '英文名', code: 'real_name_en' },
......@@ -215,6 +216,7 @@ export default {
edit: {
to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_education' } }
},
required: true,
isMultiple: true,
items: [
{
......@@ -235,6 +237,7 @@ export default {
edit: {
to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_career' } }
},
required: true,
isMultiple: true,
items: [
{
......@@ -259,25 +262,13 @@ export default {
{ label: '工作描述', code: 'job_desc_cn' }
]
},
{
title: '学习目的',
code: 'answers',
edit: {
to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_answer' } }
},
computed(data = []) {
const result = data.map(item => {
return `<dl><dt>${item.question}</dt><dd>${item.answer}</dd></dl>`
})
return `<div class="answers">${result.join('')}</div>`
}
},
{
title: '所受培训',
code: 'trainings',
edit: {
to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_training' } }
},
required: false,
isMultiple: true,
items: [
{
......@@ -297,6 +288,7 @@ export default {
edit: {
to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_honor' } }
},
required: false,
isMultiple: true,
items: [
{ label: '获取时间', code: 'time' },
......@@ -304,12 +296,27 @@ export default {
{ label: '授予机构', code: 'institution_cn' }
]
},
{
title: '学习目的',
code: 'answers',
required: true,
edit: {
to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_answer' } }
},
computed(data = []) {
const result = data.map(item => {
return `<dl><dt>${item.question}</dt><dd>${item.answer}</dd></dl>`
})
return `<div class="answers">${result.join('')}</div>`
}
},
{
title: '照片/附件',
code: 'attachments',
edit: {
to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_attachment' } }
}
},
required: true
}
// {
// title: '推荐信',
......@@ -423,6 +430,9 @@ export default {
navbar: false,
toolbar: { zoomIn: true, zoomOut: true, rotateLeft: true, rotateRight: true }
})
},
isSuccess(data, item) {
return data.progress === 1 || (Object.hasOwnProperty.call(item, 'required') && !item.required)
}
},
beforeMount() {
......
......@@ -5,9 +5,10 @@
"requires": true,
"packages": {
"": {
"name": "project-pc",
"version": "1.0.0",
"dependencies": {
"@ezijing/vue-form": "^2.2.1",
"@ezijing/vue-form": "^2.2.2",
"axios": "^0.21.1",
"cookie-universal-nuxt": "^2.1.4",
"core-js": "^3.9.1",
......@@ -1009,9 +1010,9 @@
}
},
"node_modules/@ezijing/vue-form": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.2.1.tgz",
"integrity": "sha512-6N6hM7vUAFQ+47lv2t3TYdAxOt2TEIlOWnvH7CkTp1noupSm+jCsu6lllmQb+F5GZX5wcQT4g6np66NsfxRWCA==",
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.2.2.tgz",
"integrity": "sha512-kfFnnpYxW+mW96Ba/+FxKKGmhOpPOAPmhUC71EVqOk49gFaqwpmjnUMLLHmC3jFXkfyGSwQNqSWLILrf+ii3bQ==",
"dependencies": {
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
"@vue/babel-preset-jsx": "^1.1.2",
......@@ -13722,9 +13723,9 @@
"integrity": "sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw=="
},
"@ezijing/vue-form": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.2.1.tgz",
"integrity": "sha512-6N6hM7vUAFQ+47lv2t3TYdAxOt2TEIlOWnvH7CkTp1noupSm+jCsu6lllmQb+F5GZX5wcQT4g6np66NsfxRWCA==",
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.2.2.tgz",
"integrity": "sha512-kfFnnpYxW+mW96Ba/+FxKKGmhOpPOAPmhUC71EVqOk49gFaqwpmjnUMLLHmC3jFXkfyGSwQNqSWLILrf+ii3bQ==",
"requires": {
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
"@vue/babel-preset-jsx": "^1.1.2",
......
......@@ -10,7 +10,7 @@
"generate": "nuxt generate"
},
"dependencies": {
"@ezijing/vue-form": "^2.2.1",
"@ezijing/vue-form": "^2.2.2",
"axios": "^0.21.1",
"cookie-universal-nuxt": "^2.1.4",
"core-js": "^3.9.1",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论