From 680f44ec4b192f1952b8c52d26a1d1aed4131c80 Mon Sep 17 00:00:00 2001
From: 吴学文 <wuxuewen@wuxuewendeMacBook-Pro.local>
Date: 星期四, 16 五月 2019 23:23:13 +0800
Subject: [PATCH] 加入添加业主信息 未测试

---
 WebService/src/main/resources/components/add-owner/addOwner.js |   51 +++++++++++++++++++++++++++++++++++----------------
 1 files changed, 35 insertions(+), 16 deletions(-)

diff --git a/WebService/src/main/resources/components/add-owner/addOwner.js b/WebService/src/main/resources/components/add-owner/addOwner.js
index aa8f506..7755415 100644
--- a/WebService/src/main/resources/components/add-owner/addOwner.js
+++ b/WebService/src/main/resources/components/add-owner/addOwner.js
@@ -4,9 +4,10 @@
         data:{
             addOwnerInfo:{
                 name:'',
-                ownerNum:'',
-                remark:'',
-                errorInfo:''
+                age:'',
+                link:'',
+                sex:'',
+                remark:''
             }
         },
          _initMethod:function(){
@@ -26,25 +27,44 @@
                         {
                             limit:"required",
                             param:"",
-                            errInfo:"妤煎悕绉颁笉鑳戒负绌�"
+                            errInfo:"鍚嶇О涓嶈兘涓虹┖"
                         },
                         {
                             limit:"maxin",
                             param:"2,10",
-                            errInfo:"妤煎悕绉伴暱搴﹀繀椤诲湪2浣嶈嚦10浣�"
+                            errInfo:"鍚嶇О闀垮害蹇呴』鍦�2浣嶈嚦10浣�"
                         },
                     ],
-                    'addOwnerInfo.ownerNum':[
+                    'addOwnerInfo.age':[
                         {
                             limit:"required",
                             param:"",
-                            errInfo:"妤肩紪鍙蜂笉鑳戒负绌�"
+                            errInfo:"骞撮緞涓嶈兘涓虹┖"
                         },
                         {
                             limit:"num",
                             param:"",
-                            errInfo:"涓嶆槸鏈夋晥鐨勬暟瀛�"
+                            errInfo:"骞撮緞涓嶆槸鏈夋晥鐨勬暟瀛�"
                         },
+                    ],
+                    'addOwnerInfo.sex':[
+                        {
+                            limit:"required",
+                            param:"",
+                            errInfo:"鎬у埆涓嶈兘涓虹┖"
+                        }
+                    ],
+                    'addOwnerInfo.link':[
+                        {
+                            limit:"required",
+                            param:"",
+                            errInfo:"鎵嬫満鍙蜂笉鑳戒负绌�"
+                        },
+                        {
+                            limit:"phone",
+                            param:"",
+                            errInfo:"涓嶆槸鏈夋晥鐨勬墜鏈哄彿"
+                        }
                     ],
                     'addOwnerInfo.remark':[
 
@@ -59,12 +79,10 @@
             },
             saveOwnerInfo:function(){
                 if(!vc.component.addOwnerValidate()){
-                    vc.component.addOwnerInfo.errorInfo = vc.validate.errInfo;
+                    vc.message(vc.validate.errInfo);
 
                     return ;
                 }
-
-                vc.component.addOwnerInfo.errorInfo = "";
 
                 vc.component.addOwnerInfo.communityId = vc.getCurrentCommunity().communityId;
                 vc.http.post(
@@ -84,22 +102,23 @@
 
                             return ;
                         }
-                        vc.component.addOwnerInfo.errorInfo = json;
+                        vc.message(json);
 
                      },
                      function(errInfo,error){
                         console.log('璇锋眰澶辫触澶勭悊');
 
-                        vc.component.addOwnerInfo.errorInfo = errInfo;
+                        vc.message(errInfo);
 
                      });
             },
             clearAddOwnerInfo:function(){
                 vc.component.addOwnerInfo = {
                                             name:'',
-                                            ownerNum:'',
-                                            remark:'',
-                                            errorInfo:''
+                                            age:'',
+                                            link:'',
+                                            sex:'',
+                                            remark:''
                                         };
             }
         }

--
Gitblit v1.8.0