Merge pull request 'fix : 修复提交校验' (#455) from dd into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/455
This commit is contained in:
@@ -95,7 +95,6 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|||||||
@@ -279,11 +279,12 @@ const handleSubmit = (instance) => {
|
|||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: '请完善数据,再提交!',
|
message: '请完善数据,再提交!',
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
let researchPersonnelId = ''
|
let researchPersonnelId = ''
|
||||||
formData.value.tableData.forEach(item => {
|
formData.value.tableData.forEach(item => {
|
||||||
@@ -326,11 +327,12 @@ const handleResubmit = (instance) => {
|
|||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: '请完善数据,再提交!',
|
message: '请完善数据,再提交!',
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
let newUsrAllocationsObj = {}
|
let newUsrAllocationsObj = {}
|
||||||
let newUsrAllocationsObjArray = []
|
let newUsrAllocationsObjArray = []
|
||||||
|
|||||||
@@ -58,7 +58,10 @@
|
|||||||
<el-button color="#DED0B2" @click="showCompany">{{ selectedCompanyList.length === 0 ? '请选择征集公司' : '更改' }}
|
<el-button color="#DED0B2" @click="showCompany">{{ selectedCompanyList.length === 0 ? '请选择征集公司' : '更改' }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="route.query.id" :class="showExpendClass(showMoreCompany)">{{ getName(selectedCompanyList) }}</div>
|
<div v-if="route.query.id" :class="showExpendClass(showMoreCompany)">{{
|
||||||
|
getName(selectedCompanyList)
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
<div v-else :class="showExpendClass(showMoreCompany)">{{ getName(selectedCompanyList) }}</div>
|
<div v-else :class="showExpendClass(showMoreCompany)">{{ getName(selectedCompanyList) }}</div>
|
||||||
<div style="color: #2a99ff;text-align: center;width: 100%;font-size: 15px;cursor: pointer"
|
<div style="color: #2a99ff;text-align: center;width: 100%;font-size: 15px;cursor: pointer"
|
||||||
@click="handleExpend">
|
@click="handleExpend">
|
||||||
@@ -365,14 +368,16 @@ const submitParam = (item) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const handleSubmit = async (instance) => {
|
const handleSubmit = async (instance) => {
|
||||||
|
console.log('submitParam(formData.value)', submitParam(formData.value))
|
||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: '请完善数据,再提交!',
|
message: '请完善数据,再提交!',
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
const {msg, code} = await addRequirement(submitParam(formData.value))
|
const {msg, code} = await addRequirement(submitParam(formData.value))
|
||||||
ElNotification({
|
ElNotification({
|
||||||
|
|||||||
@@ -214,7 +214,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="16" v-if="formData.isSpecialFund">
|
<el-col :span="16" v-if="formData.isSpecialFund">
|
||||||
<el-form-item label="其中申请公司总部科技创新专项资金(元)">
|
<el-form-item label="其中申请公司总部科技创新专项资金(元)" prop="specialFundAmount">
|
||||||
<el-input-number v-model="formData.specialFundAmount" placeholder="请输入专项资金" :controls="false"/>
|
<el-input-number v-model="formData.specialFundAmount" placeholder="请输入专项资金" :controls="false"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -294,7 +294,7 @@ const formData = ref({
|
|||||||
|
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
projectName: [{required: true, message: '请输入项目名称', trigger: 'blur'}],
|
projectName: [{required: true, message: '请输入项目名称', trigger: 'blur'}],
|
||||||
// specialFundId: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
specialFundId: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||||
startTime: [{required: true, message: '请选择开始时间', trigger: ['blur', 'change']}],
|
startTime: [{required: true, message: '请选择开始时间', trigger: ['blur', 'change']}],
|
||||||
endTime: [{required: true, message: '请选择结束时间', trigger: ['blur', 'change']}],
|
endTime: [{required: true, message: '请选择结束时间', trigger: ['blur', 'change']}],
|
||||||
rdSubject: [{required: true, message: '请选择研发主体', trigger: ['blur', 'change']}],
|
rdSubject: [{required: true, message: '请选择研发主体', trigger: ['blur', 'change']}],
|
||||||
@@ -401,11 +401,12 @@ const handleSubmit = debounce(async (instance) => {
|
|||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid, fields) => {
|
instance.validate(async (valid, fields) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: '请完善数据,再提交!',
|
message: '请完善数据,再提交!',
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
let otherFiles = []
|
let otherFiles = []
|
||||||
otherFileList.value.forEach(item => {
|
otherFileList.value.forEach(item => {
|
||||||
|
|||||||
@@ -89,11 +89,12 @@ const handleSubmit = (instance) => {
|
|||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: '请完善数据,再提交!',
|
message: '请完善数据,再提交!',
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
let files = []
|
let files = []
|
||||||
otherFileList.value.forEach(item => {
|
otherFileList.value.forEach(item => {
|
||||||
@@ -139,11 +140,12 @@ const handleResubmit = (instance) => {
|
|||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: '请完善数据,再提交!',
|
message: '请完善数据,再提交!',
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
let otherFiles = []
|
let otherFiles = []
|
||||||
if (name.value === 'Implementation/edit') {
|
if (name.value === 'Implementation/edit') {
|
||||||
|
|||||||
@@ -183,11 +183,12 @@ const handleSubmit = async (instance) => {
|
|||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: '请完善数据,再提交!',
|
message: '请完善数据,再提交!',
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
let params = {
|
let params = {
|
||||||
fileList: fileList.value,
|
fileList: fileList.value,
|
||||||
|
|||||||
@@ -173,11 +173,12 @@ const handleSubmit = (instance) => {
|
|||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: '请完善数据,再提交!',
|
message: '请完善数据,再提交!',
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
instance.clearValidate()
|
instance.clearValidate()
|
||||||
tableForm.tableData.forEach(item => {
|
tableForm.tableData.forEach(item => {
|
||||||
|
|||||||
@@ -138,11 +138,12 @@ const handleSubmit = (instance) => {
|
|||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: '请完善数据,再提交!',
|
message: '请完善数据,再提交!',
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
let files = []
|
let files = []
|
||||||
otherFileList.value.forEach(item => {
|
otherFileList.value.forEach(item => {
|
||||||
|
|||||||
@@ -189,11 +189,12 @@ const handleSubmit = async (instance) => {
|
|||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: '请完善数据,再提交!',
|
message: '请完善数据,再提交!',
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
const {msg, code} = await addFund(submitParam(formData.value))
|
const {msg, code} = await addFund(submitParam(formData.value))
|
||||||
ElNotification({
|
ElNotification({
|
||||||
|
|||||||
Reference in New Issue
Block a user