| | |
| | | data:{ |
| | | editResourceStoreInfo:{ |
| | | resId:'', |
| | | resName:'', |
| | | resCode:'', |
| | | price:'', |
| | | stock:'', |
| | | description:'', |
| | | resName:'', |
| | | resCode:'', |
| | | price:'', |
| | | description:'', |
| | | |
| | | } |
| | | }, |
| | |
| | | }, |
| | | ], |
| | | 'editResourceStoreInfo.resCode':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"物品编码不能为空" |
| | | }, |
| | | { |
| | | limit:"maxin", |
| | | param:"2,50", |
| | | errInfo:"物品编码必须在2至50字符之间" |
| | | limit:"maxLength", |
| | | param:"50", |
| | | errInfo:"物品编码不能超过50位" |
| | | }, |
| | | ], |
| | | 'editResourceStoreInfo.price':[ |
| | |
| | | errInfo:"物品价格格式错误" |
| | | }, |
| | | ], |
| | | 'editResourceStoreInfo.stock':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"物品库存不能为空" |
| | | }, |
| | | { |
| | | limit:"num", |
| | | param:"", |
| | | errInfo:"物品库存不是有效数字" |
| | | }, |
| | | ], |
| | | |
| | | 'editResourceStoreInfo.description':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"描述不能为空" |
| | | }, |
| | | { |
| | | limit:"maxLength", |
| | | param:"200", |
| | |
| | | }, |
| | | editResourceStore:function(){ |
| | | if(!vc.component.editResourceStoreValidate()){ |
| | | vc.message(vc.validate.errInfo); |
| | | vc.toast(vc.validate.errInfo); |
| | | return ; |
| | | } |
| | | |
| | |
| | | refreshEditResourceStoreInfo:function(){ |
| | | vc.component.editResourceStoreInfo= { |
| | | resId:'', |
| | | resName:'', |
| | | resCode:'', |
| | | price:'', |
| | | stock:'', |
| | | description:'', |
| | | resName:'', |
| | | resCode:'', |
| | | price:'', |
| | | description:'', |
| | | |
| | | } |
| | | } |