1.增加多个字段判断

This commit is contained in:
王创世 2025-04-18 19:59:21 +08:00
parent ce4a1962e0
commit 288823bac5

View File

@ -1185,11 +1185,11 @@ export default {
dimension: '', dimension: '',
tuan: [{ tuan: [{
name: '', name: '',
sex: '', sex: '',
job: '', job: '',
tun_job: '', tun_job: '',
phone: '', phone: '',
}], }],
hj: [ hj: [
{ {
time: '', time: '',
@ -1909,6 +1909,8 @@ export default {
if (this.formData.work == null || this.formData.work.length == 0) { if (this.formData.work == null || this.formData.work.length == 0) {
this.$message.error('请输入学习工作经历!'); this.$message.error('请输入学习工作经历!');
return; return;
} else {
this.formData.work = JSON.parse(this.formData.work);
} }
if (this.formData.social_duties == null || this.formData.social_duties.length == 0) { if (this.formData.social_duties == null || this.formData.social_duties.length == 0) {
this.$message.error('请选择主要社会职务!'); this.$message.error('请选择主要社会职务!');
@ -2003,9 +2005,11 @@ export default {
this.$message.error('请上传企业信用信息报告!'); this.$message.error('请上传企业信用信息报告!');
return; return;
} }
if (this.formData.contacts_list.length == 0) { if (this.formData.contacts.length == 0) {
this.$message.error('请输入紧急联系人!'); this.$message.error('请输入紧急联系人!');
return; return;
}else{
this.formData.contacts = JSON.parse(this.formData.contacts);
} }
if (this.formData.enterprise_Introduction == null || this.formData.enterprise_Introduction == '') { if (this.formData.enterprise_Introduction == null || this.formData.enterprise_Introduction == '') {
this.$message.error('请输入企业简介!'); this.$message.error('请输入企业简介!');
@ -2014,6 +2018,8 @@ export default {
if (this.formData.zl_list.length == 0) { if (this.formData.zl_list.length == 0) {
this.$message.error('请上传荣誉与专利!'); this.$message.error('请上传荣誉与专利!');
return; return;
}else{
this.formData.zl_list = JSON.parse(this.formData.zl_list);
} }
if (this.formData.qitaqiyerenzhiqingkuang == null || this.formData.qitaqiyerenzhiqingkuang == '') { if (this.formData.qitaqiyerenzhiqingkuang == null || this.formData.qitaqiyerenzhiqingkuang == '') {
this.$message.error('请输入其他企业任职情况!'); this.$message.error('请输入其他企业任职情况!');
@ -2023,87 +2029,94 @@ export default {
this.$message.error('请输入企业履行社会责任情况!'); this.$message.error('请输入企业履行社会责任情况!');
return; return;
} }
if(this.formData.if_abroad == null || this.formData.if_abroad == ''){ if (this.formData.if_abroad == null || this.formData.if_abroad == '') {
this.$message.error('请选择是否开展海外业务!'); this.$message.error('请选择是否开展海外业务!');
return; return;
} }
if(this.formData.if_abroad == 0){ if (this.formData.if_abroad == 0) {
if(this.formData.abroad_region_id == null || this.formData.abroad_region_id == ''){ if (this.formData.abroad_region_id == null || this.formData.abroad_region_id == '') {
this.$message.error('请选择国家/城市!'); this.$message.error('请选择国家/城市!');
return; return;
} }
if(this.formData.staff_size == null || this.formData.staff_size == ''){ if (this.formData.staff_size == null || this.formData.staff_size == '') {
this.$message.error('请输入人员规模!'); this.$message.error('请输入人员规模!');
return; return;
} }
if(this.formData.business_case == null || this.formData.business_case == ''){ if (this.formData.business_case == null || this.formData.business_case == '') {
this.$message.error('请输入经营情况!'); this.$message.error('请输入经营情况!');
return; return;
} }
if(this.formData.economic_and_trade_exchanges_with_china == null || this.formData.economic_and_trade_exchanges_with_china == ''){ if (this.formData.economic_and_trade_exchanges_with_china == null || this.formData.economic_and_trade_exchanges_with_china == '') {
this.$message.error('请输入涉华经贸往来情况!'); this.$message.error('请输入涉华经贸往来情况!');
return; return;
} }
} }
if(this.formData.if_party == null || this.formData.if_party == ''){ if (this.formData.if_party == null || this.formData.if_party == '') {
this.$message.error('请选择是否成立党组织!'); this.$message.error('请选择是否成立党组织!');
return; return;
} }
if(this.formData.if_party == 0){ if (this.formData.if_party == 0) {
if(this.formData.party_nature == null || this.formData.party_nature == ''){ if (this.formData.party_nature == null || this.formData.party_nature == '') {
this.$message.error('请选择党组织性质!'); this.$message.error('请选择党组织性质!');
return; return;
} }
if(this.formData.partytime == null || this.formData.partytime == ''){ if (this.formData.partytime == null || this.formData.partytime == '') {
this.$message.error('请输入建党时间!'); this.$message.error('请输入建党时间!');
return; return;
} }
if(this.formData.party_number == null || this.formData.party_number == ''){ if (this.formData.party_number == null || this.formData.party_number == '') {
this.$message.error('请输入建党人数!'); this.$message.error('请输入建党人数!');
return; return;
} }
if(this.formData.manager_party == null || this.formData.manager_party == ''){ if (this.formData.manager_party == null || this.formData.manager_party == '') {
this.$message.error('请输入上级党组织!'); this.$message.error('请输入上级党组织!');
return; return;
} }
if(this.formData.party.length == 0){ if (this.formData.party.length == 0) {
this.$message.error('请输入党委负责人信息!'); this.$message.error('请输入党委负责人信息!');
return; return;
} else {
this.formData.party = JSON.parse(this.formData.party);
} }
} }
if(this.formData.if_organization == null || this.formData.if_organization == ''){ if (this.formData.if_organization == null || this.formData.if_organization == '') {
this.$message.error('请选择是否成立团组织!'); this.$message.error('请选择是否成立团组织!');
return; return;
} }
if(this.formData.if_party == 0){ if (this.formData.if_party == 0) {
if(this.formData.nature == null || this.formData.nature == ''){ if (this.formData.nature == null || this.formData.nature == '') {
this.$message.error('请选择团组织性质!'); this.$message.error('请选择团组织性质!');
return; return;
} }
if(this.formData.jiantuan_time == null || this.formData.jiantuan_time == ''){ if (this.formData.jiantuan_time == null || this.formData.jiantuan_time == '') {
this.$message.error('请输入建团时间!'); this.$message.error('请输入建团时间!');
return; return;
} }
if(this.formData.jiantuan_number == null || this.formData.jiantuan_number == ''){ if (this.formData.jiantuan_number == null || this.formData.jiantuan_number == '') {
this.$message.error('请输入建团人数!'); this.$message.error('请输入建团人数!');
return; return;
} }
if(this.formData.youth_number == null || this.formData.youth_number == ''){ if (this.formData.youth_number == null || this.formData.youth_number == '') {
this.$message.error('请输入青年人数!'); this.$message.error('请输入青年人数!');
return; return;
} }
if(this.formData.superior_nature == null || this.formData.superior_nature == ''){ if (this.formData.superior_nature == null || this.formData.superior_nature == '') {
this.$message.error('请输入上级团组织!'); this.$message.error('请输入上级团组织!');
return; return;
} }
if(this.formData.party.length == 0){ if (this.formData.party.length == 0) {
this.$message.error('请输入团组织负责人信息!'); this.$message.error('请输入团组织负责人信息!');
return; return;
} else {
this.formData.tuan = JSON.parse(this.formData.tuan);
} }
} }
if(this.formData.hj.length >0){
this.formData.hj = JSON.parse(this.formData.hj);
}
this.$request this.$request
.post('/move/temporary_token/shenqing', this.formData) .post('/move/temporary_token/shenqing', this.formData)
.then((res) => { .then((res) => {