From 69203918865043ab85477a3d1ad235f30f383976 Mon Sep 17 00:00:00 2001
From: duckweed <duckweed_lzy@aliyun.com>
Date: 星期二, 29 十月 2019 15:19:32 +0800
Subject: [PATCH] 物品出库页面调试
---
WebService/src/main/resources/components/itemOutPackage/edit-resourceStore/editItemNumberStore.js | 152 +++++++++++++++++++++++++-------------------------
1 files changed, 76 insertions(+), 76 deletions(-)
diff --git a/WebService/src/main/resources/components/itemOutPackage/edit-resourceStore/editItemNumberStore.js b/WebService/src/main/resources/components/itemOutPackage/edit-resourceStore/editItemNumberStore.js
index e5fbfc7..ab47ae4 100644
--- a/WebService/src/main/resources/components/itemOutPackage/edit-resourceStore/editItemNumberStore.js
+++ b/WebService/src/main/resources/components/itemOutPackage/edit-resourceStore/editItemNumberStore.js
@@ -1,86 +1,86 @@
-(function(vc,vm){
+(function (vc, vm) {
vc.extends({
- data:{
- editResourceStoreInfo:{
- resId:'',
- resName:'',
- resCode:'',
- price:'',
- description:'',
- stock:''
+ data: {
+ editResourceStoreInfo: {
+ resId: '',
+ resName: '',
+ resCode: '',
+ price: '',
+ description: '',
+ stock: ''
}
},
- _initMethod:function(){
+ _initMethod: function () {
- },
- _initEvent:function(){
- vc.on('editItemNumberStore','openEditItemNumberStoreModal',function(_params){
- console.log(_params);
+ },
+ _initEvent: function () {
+ vc.on('editItemNumberStore', 'openEditItemNumberStoreModal', function (_params) {
vc.component.refreshEditResourceStoreInfo();
$('#editItemNumberStoreModel').modal('show');
- vc.copyObject(_params, vc.component.editResourceStoreInfo );
+ vc.copyObject(_params, vc.component.editResourceStoreInfo);
+ vc.component.editResourceStoreInfo.stock = _params.stock;
vc.component.editResourceStoreInfo.communityId = vc.getCurrentCommunity().communityId;
});
},
- methods:{
- editResourceStoreValidate:function(){
- return vc.validate.validate({
- editResourceStoreInfo:vc.component.editResourceStoreInfo
- },{
- 'editResourceStoreInfo.resName':[
-{
- limit:"required",
- param:"",
- errInfo:"鐗╁搧鍚嶇О涓嶈兘涓虹┖"
+ methods: {
+ editResourceStoreValidate: function () {
+ return vc.validate.validate({
+ editResourceStoreInfo: vc.component.editResourceStoreInfo
+ }, {
+ 'editResourceStoreInfo.resName': [
+ {
+ limit: "required",
+ param: "",
+ errInfo: "鐗╁搧鍚嶇О涓嶈兘涓虹┖"
},
- {
- limit:"maxin",
- param:"2,100",
- errInfo:"鐗╁搧鍚嶇О闀垮害涓�2鑷�100"
+ {
+ limit: "maxin",
+ param: "2,100",
+ errInfo: "鐗╁搧鍚嶇О闀垮害涓�2鑷�100"
},
],
-'editResourceStoreInfo.resCode':[
- {
- limit:"maxLength",
- param:"50",
- errInfo:"鐗╁搧缂栫爜涓嶈兘瓒呰繃50浣�"
+ 'editResourceStoreInfo.resCode': [
+ {
+ limit: "maxLength",
+ param: "50",
+ errInfo: "鐗╁搧缂栫爜涓嶈兘瓒呰繃50浣�"
},
],
-'editResourceStoreInfo.price':[
-{
- limit:"required",
- param:"",
- errInfo:"鐗╁搧浠锋牸涓嶈兘涓虹┖"
+ 'editResourceStoreInfo.price': [
+ {
+ limit: "required",
+ param: "",
+ errInfo: "鐗╁搧浠锋牸涓嶈兘涓虹┖"
},
- {
- limit:"money",
- param:"",
- errInfo:"鐗╁搧浠锋牸鏍煎紡閿欒"
+ {
+ limit: "money",
+ param: "",
+ errInfo: "鐗╁搧浠锋牸鏍煎紡閿欒"
},
],
-'editResourceStoreInfo.description':[
- {
- limit:"maxLength",
- param:"200",
- errInfo:"鎻忚堪涓嶈兘涓虹┖"
+ 'editResourceStoreInfo.description': [
+ {
+ limit: "maxLength",
+ param: "200",
+ errInfo: "鎻忚堪涓嶈兘涓虹┖"
},
],
-'editResourceStoreInfo.resId':[
-{
- limit:"required",
- param:"",
- errInfo:"鐗╁搧ID涓嶈兘涓虹┖"
+ 'editResourceStoreInfo.resId': [
+ {
+ limit: "required",
+ param: "",
+ errInfo: "鐗╁搧ID涓嶈兘涓虹┖"
}]
- });
- },
- editResourceStore:function(){
- if(!vc.component.editResourceStoreValidate()){
+ });
+ },
+ editResourceStore: function () {
+ if (!vc.component.editResourceStoreValidate()) {
vc.message(vc.validate.errInfo);
- return ;
+ return;
}
vc.http.post(
@@ -88,35 +88,35 @@
'update',
JSON.stringify(vc.component.editResourceStoreInfo),
{
- emulateJSON:true
- },
- function(json,res){
+ emulateJSON: true
+ },
+ function (json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
- if(res.status == 200){
+ if (res.status == 200) {
//鍏抽棴model
$('#editResourceStoreModel').modal('hide');
- vc.emit('resourceStoreManage','listResourceStore',{});
- return ;
+ vc.emit('resourceStoreManage', 'listResourceStore', {});
+ return;
}
vc.message(json);
- },
- function(errInfo,error){
+ },
+ function (errInfo, error) {
console.log('璇锋眰澶辫触澶勭悊');
vc.message(errInfo);
- });
+ });
},
- refreshEditResourceStoreInfo:function(){
- vc.component.editResourceStoreInfo= {
- resId:'',
- resName:'',
- resCode:'',
- price:'',
- description:'',
-
+ refreshEditResourceStoreInfo: function () {
+ vc.component.editResourceStoreInfo = {
+ resId: '',
+ resName: '',
+ resCode: '',
+ price: '',
+ description: '',
+ stock: ''
}
}
}
});
-})(window.vc,window.vc.component);
+})(window.vc, window.vc.component);
--
Gitblit v1.8.0