Commit ddb33ed3 authored by 徐俊's avatar 徐俊

xujun

parent 5ff83e43
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
</template> </template>
<script> <script>
const Budget = { id: null, talentId: null, budgetId: null, yearValue1: 0.00, yearValue2: 0.00, yearValue3: 0.00, yearValue4: 0.00, yearValue5: 0.00, amountFee: 0.00, showIndex: null, isRequired: false } const Budget = { id: null, talentId: null, budgetId: "00000000-0000-0000-0000-000000000000", yearValue1: 0.00, yearValue2: 0.00, yearValue3: 0.00, yearValue4: 0.00, yearValue5: 0.00, amountFee: 0.00, showIndex: null, isRequired: false }
export default { export default {
name: "budgetEdit", name: "budgetEdit",
...@@ -187,7 +187,7 @@ export default { ...@@ -187,7 +187,7 @@ export default {
} }
}, },
created() { created() {
this.calTotalFee()
}, },
methods: { methods: {
FeeChange (index) { FeeChange (index) {
...@@ -202,7 +202,6 @@ export default { ...@@ -202,7 +202,6 @@ export default {
this.calTotalFee() this.calTotalFee()
}, },
YearValue1Change (index) { YearValue1Change (index) {
this.FeeChange(index) this.FeeChange(index)
}, },
...@@ -283,6 +282,9 @@ export default { ...@@ -283,6 +282,9 @@ export default {
if (index !== -1) { if (index !== -1) {
this.budgetList.splice(index, 1) this.budgetList.splice(index, 1)
} }
},
getTotalFee() {
return parseFloat(this.totalFee);
} }
} }
} }
......
<template>
<div>
<a-row>
<a-col :span="24" style="border-top: 0px; text-align: center">
<div class="main-title">
<span>附件</span>
</div>
</a-col>
</a-row>
<a-row type="flex" class="row_center">
<a-col :span="2" class="bg-gray">
<div class="special-middle">
<div>序号</div>
</div>
</a-col>
<a-col :span="6" class="bg-gray">
<div class="special-middle">
<div>附件名称</div>
</div>
</a-col>
<a-col :span="2" class="bg-gray">
<div class="special-middle">
<div>是否必备材料</div>
</div>
</a-col>
<a-col :span="12" class="bg-gray">
<div class="special-middle">
<div>附件上传</div>
</div>
</a-col>
<a-col :span="2" class="bg-gray">
<div class="special-middle">
<div>操作</div>
</div>
</a-col>
</a-row>
<a-row v-for="(item, index) in fileList" :key="'fileList' + index" type="flex">
<a-col :span="2" style="text-align: center; margin-top: 8px;">
{{ index + 1 }}
</a-col>
<a-col :span="6">
<div class="special-middle" v-if="item.required">{{ item.fileExplain }}</div>
<a-form-model-item v-else :prop="'fileList.' + index + '.fileExplain'" :rules="{required: item.isRequired, message: '*',trigger: 'blur',}">
<a-input v-model="item.fileExplain" :maxLength="100" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="2">
<div class="special-middle" style="text-align: center;">
<div>{{ item.isRequired == true && item.required ? "是" : "否" }}</div>
</div>
</a-col>
<a-col :span="12" style="text-align: left;">
<div v-if="!item.isTitle" class="special-middle" style="text-align: left;">
<file-load :file.sync="fileList[index]" :index="index" :name="'fileList'" :format="['doc', 'docx', 'pdf']" />
</div>
</a-col>
<a-col :span="2">
<div class="special-middle">
<div v-if="!item.required">
<a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="removefileList(item)">
<a-button type="link" size="small">删除</a-button>
</a-popconfirm>
</div>
</div>
</a-col>
</a-row>
<a-row type="flex">
<a-col :span="24" style="text-align: center">
<div class="special-middle">
<div>
<a-button type="dashed" style="width: 50%" @click="addfileList()">
<a-icon type="plus" /> 添加
</a-button>
</div>
</div>
</a-col>
</a-row>
</div>
</template>
<script>
const File = { fileName: null, downloadUrl: null, fileExplain: null, downloadId: null, isRequired: true, required: false, isTitle: false };
export default {
name: "fileEdit",
props: {
fileList: {
type: Array,
default: () => {
return [{ ...File }];
},
},
},
data() {
return {};
},
created() {
},
methods: {
// 添加附件
addfileList () {
this.fileList.push(Object.assign({ ...File }, { fileExplain: '' }))
},
// 删除附件
removefileList (item) {
let index = this.fileList.indexOf(item)
if (index !== -1) {
this.fileList.splice(index, 1)
}
},
}
};
</script>
\ No newline at end of file
<template>
<div>
</div>
</template>
<script>
export default {
name: "fileInfo",
data() {
return {};
},
methods: {
}
};
</script>
\ No newline at end of file
...@@ -466,9 +466,38 @@ ...@@ -466,9 +466,38 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<budget-edit :budgetList.sync="formData.budgetList" /> <budget-edit ref="talentBudget" :budgetList.sync="formData.budgetList" />
<a-row>
<a-col :span="24" style="border-top: 0px; text-align: center">
<div class="main-title">
<span>申报人所在单位培养计划和培养目标</span>
</div>
</a-col>
</a-row>
<a-row type="flex" class="row_center">
<a-col :span="24" class="bg-gray">
<a-form-model-item prop="planTarget">
<a-textarea placeholder="培养计划和培养目标(限1000字)" v-model="formData.planTarget" :maxLength="1000" style="width: 80%; height: 160px; margin-top: 12px" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="24" style="border-top: 0px; text-align: center">
<div class="main-title">
<span>申报人所在单位的学科发展和人才队伍建设专家指导委员会审核意见</span>
</div>
</a-col>
</a-row>
<a-row type="flex" class="row_center">
<a-col :span="24" class="bg-gray">
<a-form-model-item prop="unitAdvice">
<a-textarea placeholder="指导委员会审核意见(限800字)" v-model="formData.unitAdvice" :maxLength="800" style="width: 80%; height: 160px; margin-top: 12px" />
</a-form-model-item>
</a-col>
</a-row>
</div> </div>
<div v-if="stepsArray[5].showStatus"> <div v-if="stepsArray[5].showStatus">
<file-edit :fileList.sync="formData.fileList" />
</div> </div>
</a-form-model> </a-form-model>
</div> </div>
...@@ -484,11 +513,12 @@ import resumeEdit from '@/views/report/talent/components/resumeEdit' ...@@ -484,11 +513,12 @@ import resumeEdit from '@/views/report/talent/components/resumeEdit'
import scientificGainEdit from '@/views/report/talent/components/scientificGainEdit' import scientificGainEdit from '@/views/report/talent/components/scientificGainEdit'
import membersEdit from '@/views/report/talent/components/membersEdit' import membersEdit from '@/views/report/talent/components/membersEdit'
import budgetEdit from '@/views/report/talent/components/budgetEdit' import budgetEdit from '@/views/report/talent/components/budgetEdit'
import fileEdit from '@/views/report/talent/components/fileEdit'
export default { export default {
name: "talentEdit", name: "talentEdit",
components: { components: {
paraRadio, paraCheck, cascaderSelect, resumeEdit, scientificGainEdit, membersEdit, budgetEdit paraRadio, paraCheck, cascaderSelect, resumeEdit, scientificGainEdit, membersEdit, budgetEdit, fileEdit
}, },
props: { props: {
value: { value: {
...@@ -545,6 +575,9 @@ export default { ...@@ -545,6 +575,9 @@ export default {
applyFund: null, applyFund: null,
otherFund: null, otherFund: null,
totalFund: null, totalFund: null,
planTarget: null,
unitAdvice: null,
talentState: null,
resumeList: [], resumeList: [],
membersList: [], membersList: [],
budgetList: [], budgetList: [],
...@@ -576,6 +609,8 @@ export default { ...@@ -576,6 +609,8 @@ export default {
email: [{ required: true, message: '*', trigger: 'blur' }], email: [{ required: true, message: '*', trigger: 'blur' }],
applyFund: [{ required: true, message: '*', trigger: 'change' }], applyFund: [{ required: true, message: '*', trigger: 'change' }],
otherFund: [{ required: true, message: '*', trigger: 'change' }], otherFund: [{ required: true, message: '*', trigger: 'change' }],
planTarget: [{ required: true, message: '*', trigger: 'blur' }],
unitAdvice: [{ required: true, message: '*', trigger: 'blur' }],
}, },
}; };
}, },
...@@ -699,9 +734,9 @@ export default { ...@@ -699,9 +734,9 @@ export default {
this.formData.completeStatus = arr.toString() this.formData.completeStatus = arr.toString()
var obj = this.getObj(step) var obj = this.getObj(step)
obj.step = step obj.step = step
let state = obj.projState let state = obj.talentState
if (state != 30 && step == 5) if (state != 30 && step == 5)
obj.projState = 10 obj.talentState = 10
let pars = isEmptyParams(obj) let pars = isEmptyParams(obj)
let par = { ...pars } let par = { ...pars }
this.$api.talent.save(par).then(({ data = {} }) => { this.$api.talent.save(par).then(({ data = {} }) => {
...@@ -738,17 +773,19 @@ export default { ...@@ -738,17 +773,19 @@ export default {
} }
break; break;
case 1: case 1:
obj = { id: null, technicalSkill: null, resumeList: [] } obj = { id: null, technicalSkill: null, completeStatus: null, resumeList: [] }
break; break;
case 2: case 2:
obj = { id: null, qualityTarget: null, researchCondition: null, researchProgress: null, scientificList: [] } obj = { id: null, qualityTarget: null, researchCondition: null, researchProgress: null, completeStatus: null, scientificList: [] }
break; break;
case 3: case 3:
obj = { id: null, membersList: [] } obj = { id: null, completeStatus: null, membersList: [] }
break; break;
case 4: case 4:
obj = { id: null, applyFund: null, otherFund: null, totalFund: null, planTarget: null, unitAdvice: null, completeStatus: null, budgetList: [] }
break; break;
case 5: case 5:
obj = { id: null, completeStatus: null, talentState: null, fileList: [] }
break; break;
} }
...@@ -813,6 +850,18 @@ export default { ...@@ -813,6 +850,18 @@ export default {
return true return true
}, },
checkBudgetList() {
// 获取预算编辑组件中的总费用
const totalFee = this.$refs.talentBudget ? this.$refs.talentBudget.getTotalFee() : 0;
// 检查资金来源金额与支出费用金额是否相等
if (parseFloat(this.formData.totalFund) !== parseFloat(totalFee)) {
this.$message.error('资金来源金额与支出费用金额不相等,请检查!');
return false;
}
return true;
},
checkInfo(step) { checkInfo(step) {
switch (step) { switch (step) {
case 0: case 0:
...@@ -835,8 +884,10 @@ export default { ...@@ -835,8 +884,10 @@ export default {
return this.checkMemberList() return this.checkMemberList()
break; break;
case 4: case 4:
return this.checkBudgetList()
break; break;
case 5: case 5:
return true
break; break;
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment