diff --git a/src/views/sunVillage_info/informationFunPlan.vue b/src/views/sunVillage_info/informationFunPlan.vue
index 4462f13a..eadcc015 100644
--- a/src/views/sunVillage_info/informationFunPlan.vue
+++ b/src/views/sunVillage_info/informationFunPlan.vue
@@ -38,6 +38,7 @@
+ 附件
删除
修改
@@ -45,11 +46,17 @@
+
+
+ 附件
+
+
+
diff --git a/src/views/sunVillage_info/informationFunPlanAdd.vue b/src/views/sunVillage_info/informationFunPlanAdd.vue
index 272abb18..6e8faac6 100644
--- a/src/views/sunVillage_info/informationFunPlanAdd.vue
+++ b/src/views/sunVillage_info/informationFunPlanAdd.vue
@@ -24,12 +24,12 @@
@cancel="showCollectionPay = false"/>
-
-
+
+
-
+
@@ -76,6 +76,11 @@
settlementAmount:'',
remark:'',
},
+ errorMessages: {
+ orderNum: '',
+ settlementDate: '',
+ settlementAmount: '',
+ },
queryParams:{
/* pageNum:1,
pageSize:10,
@@ -154,15 +159,45 @@
onSubmit(){
- this.form.contractionId = this.contractionId;
- addPlan(this.form).then((response) => {
- if (response.code == 200){
- this.$notify({ type: 'success', message: '新增成功' });
- setTimeout(function(){
- history.back(-1);
- },2000)
- }
- });
+ event.preventDefault(); // 阻止表单默认提交行为
+
+ // 清除之前的错误消息
+ this.errorMessages.orderNum = '';
+ this.errorMessages.settlementDate = '';
+ this.errorMessages.settlementAmount = '';
+
+ let isValid = true;
+
+ // 验证结款序号
+ if (!this.form.orderNum) {
+ this.errorMessages.orderNum = '结款序号不能为空';
+ isValid = false;
+ }
+
+ // 验证结款日期
+ if (!this.form.settlementDate) {
+ this.errorMessages.settlementDate = '结款日期不能为空';
+ isValid = false;
+ }
+
+ // 验证结款金额
+ if (!this.form.settlementAmount) {
+ this.errorMessages.settlementAmount = '结款金额不能为空';
+ isValid = false;
+ }
+
+ // 如果验证通过,进行提交处理
+ if (isValid) {
+ this.form.contractionId = this.contractionId;
+ addPlan(this.form).then((response) => {
+ if (response.code == 200) {
+ this.$notify({type: 'success', message: '新增成功'});
+ setTimeout(function () {
+ history.back(-1);
+ }, 2000)
+ }
+ });
+ }
}
},
}