Showing
8 changed files
with
40 additions
and
17 deletions
@@ -57,5 +57,5 @@ module.exports=function(app) { | @@ -57,5 +57,5 @@ module.exports=function(app) { | ||
57 | 57 | ||
58 | app.post("/profile/queryUserProfileByRole","select_queryUserProfileByRole"); | 58 | app.post("/profile/queryUserProfileByRole","select_queryUserProfileByRole"); |
59 | app.post("/model/queryModelListForSelect","select_queryModelListForSelect"); | 59 | app.post("/model/queryModelListForSelect","select_queryModelListForSelect"); |
60 | - | 60 | + app.post("/productSize/queryProdSizeListForSel","select_queryProdSizeListForSel"); |
61 | } | 61 | } |
@@ -214,5 +214,12 @@ module.exports={ | @@ -214,5 +214,12 @@ module.exports={ | ||
214 | roleName:{type:String} | 214 | roleName:{type:String} |
215 | } | 215 | } |
216 | }, | 216 | }, |
217 | + queryProdSizeListForSel:{ | ||
218 | + title:'获取商品尺寸', | ||
219 | + url: '/productSize/queryProdSizeListForSel', | ||
220 | + params: { | ||
221 | + productSkn:{type:Number} | ||
222 | + } | ||
223 | + }, | ||
217 | } | 224 | } |
218 | }; | 225 | }; |
@@ -10,14 +10,13 @@ | @@ -10,14 +10,13 @@ | ||
10 | <div class="panel-body"> | 10 | <div class="panel-body"> |
11 | <h4>模特卡</h4> | 11 | <h4>模特卡</h4> |
12 | <p> | 12 | <p> |
13 | - <select class="form-control " id='select—model' required placeholder="选择模特" style="width:200px;"> | 13 | + <select class="form-control " id='select—model' placeholder="选择模特" style="width:200px;"> |
14 | <option value="-1">选择模特</option> | 14 | <option value="-1">选择模特</option> |
15 | </select> | 15 | </select> |
16 | 16 | ||
17 | - <select class="form-control" id='select—size' required placeholder="选择尺寸" style="width:200px;"> | 17 | + <select class="form-control" id='select—size' placeholder="选择尺寸" style="width:200px;"> |
18 | <option value="-1">选择尺寸</option> | 18 | <option value="-1">选择尺寸</option> |
19 | </select> | 19 | </select> |
20 | - | ||
21 | <button type="button" class="btn btn-info btn-xs btn-sort-add" id='btn-model-add' data-index=[[index]] style="float:left;">+</button> | 20 | <button type="button" class="btn btn-info btn-xs btn-sort-add" id='btn-model-add' data-index=[[index]] style="float:left;">+</button> |
22 | 21 | ||
23 | </p> | 22 | </p> |
@@ -183,6 +183,10 @@ module.exports = { | @@ -183,6 +183,10 @@ module.exports = { | ||
183 | queryModelListForSelect:{ | 183 | queryModelListForSelect:{ |
184 | title: "获取模特姓名", | 184 | title: "获取模特姓名", |
185 | url: "/model/queryModelListForSelect" | 185 | url: "/model/queryModelListForSelect" |
186 | + }, | ||
187 | + queryModelListForSelect:{ | ||
188 | + title: "获取商品尺寸", | ||
189 | + url: "/productSize/queryProdSizeListForSel" | ||
186 | } | 190 | } |
187 | } | 191 | } |
188 | }; | 192 | }; |
@@ -56,7 +56,8 @@ var urlObj = { | @@ -56,7 +56,8 @@ var urlObj = { | ||
56 | 56 | ||
57 | 57 | ||
58 | 'userProfileByRole':"/profile/queryUserProfileByRole", | 58 | 'userProfileByRole':"/profile/queryUserProfileByRole", |
59 | - 'queryModelListForSelect':"/model/queryModelListForSelect" | 59 | + 'queryModelListForSelect':"/model/queryModelListForSelect", |
60 | + 'queryProdSizeListForSel':"/productSize/queryProdSizeListForSel" | ||
60 | }; | 61 | }; |
61 | 62 | ||
62 | var minimumResultsForSearch = ["sortbybrand", "getjitSup", "sortsize2", "querySupplier"]; | 63 | var minimumResultsForSearch = ["sortbybrand", "getjitSup", "sortsize2", "querySupplier"]; |
@@ -16,11 +16,7 @@ if ($('.contentpanel').data('type') == 'info') { | @@ -16,11 +16,7 @@ if ($('.contentpanel').data('type') == 'info') { | ||
16 | $("#productSkn").val(window.NETSALEDATA.baseProductInfo.baseProduct.productSkn); | 16 | $("#productSkn").val(window.NETSALEDATA.baseProductInfo.baseProduct.productSkn); |
17 | console.log(window.NETSALEDATA); | 17 | console.log(window.NETSALEDATA); |
18 | 18 | ||
19 | -new common.dropDown({ | ||
20 | - el: '#select—model', | ||
21 | - ajax: 'queryModelListForSelect', | ||
22 | - hash: true | ||
23 | -}); | 19 | + |
24 | 20 | ||
25 | // window.GOLABDATA = { | 21 | // window.GOLABDATA = { |
26 | // on: function(key, callback) { | 22 | // on: function(key, callback) { |
@@ -8,6 +8,15 @@ new common.dropDown({ | @@ -8,6 +8,15 @@ new common.dropDown({ | ||
8 | hash: true | 8 | hash: true |
9 | }); | 9 | }); |
10 | 10 | ||
11 | +new common.dropDown({ | ||
12 | + el: '#select—size', | ||
13 | + ajax: 'queryProdSizeListForSel', | ||
14 | + hash: true, | ||
15 | + params:function(){ | ||
16 | + return{productSkn:NETSALEDATA.baseProductInfo.baseProduct.productSkn} | ||
17 | + } | ||
18 | +}); | ||
19 | + | ||
11 | var modelCardTable = new common.grid({ | 20 | var modelCardTable = new common.grid({ |
12 | el: "#model-card", | 21 | el: "#model-card", |
13 | hash: false, | 22 | hash: false, |
@@ -32,6 +41,14 @@ $(document).on('click', '#btn-model-add', function () { | @@ -32,6 +41,14 @@ $(document).on('click', '#btn-model-add', function () { | ||
32 | var productSkn = NETSALEDATA.baseProductInfo.baseProduct.productSkn; | 41 | var productSkn = NETSALEDATA.baseProductInfo.baseProduct.productSkn; |
33 | var modelCardId = $("#select—model").val(); | 42 | var modelCardId = $("#select—model").val(); |
34 | var size = $("#select—size").val(); | 43 | var size = $("#select—size").val(); |
44 | + if(modelCardId==-1){ | ||
45 | + common.util.__tip("模特姓名不能为空"); | ||
46 | + return false; | ||
47 | + } | ||
48 | + if(size==-1){ | ||
49 | + common.util.__tip("商品尺寸不能为空"); | ||
50 | + return false; | ||
51 | + } | ||
35 | common.util.__ajax({ | 52 | common.util.__ajax({ |
36 | url: '/goods/product/addproductModelCard', | 53 | url: '/goods/product/addproductModelCard', |
37 | data: { | 54 | data: { |
@@ -79,14 +79,13 @@ if (window.NETSALEDATA) { | @@ -79,14 +79,13 @@ if (window.NETSALEDATA) { | ||
79 | var e = new common.edit("#add-list"); | 79 | var e = new common.edit("#add-list"); |
80 | dataList = res.data.list[0]; | 80 | dataList = res.data.list[0]; |
81 | common.sizeInfo.list(dataList); | 81 | common.sizeInfo.list(dataList); |
82 | - console.info(dataList.sizeRelationsList) | ||
83 | $("#noMeasureIds").val(dataList.noMeasureIds ? dataList.noMeasureIds.join("|") : ""); | 82 | $("#noMeasureIds").val(dataList.noMeasureIds ? dataList.noMeasureIds.join("|") : ""); |
84 | - if(dataList.sizeRelationsList!=""){ | ||
85 | - var sizeRelationsList = dataList.sizeRelationsList; | ||
86 | - for(var i=0;i<dataList.sizeRelationsList.length;i++){ | ||
87 | - $("#select—size").append("<option value="+sizeRelationsList[i].sizeName+">"+sizeRelationsList[i].sizeName+"</option>"); | ||
88 | - } | ||
89 | - } | 83 | + // if(dataList.sizeRelationsList!=""){ |
84 | + // var sizeRelationsList = dataList.sizeRelationsList; | ||
85 | + // for(var i=0;i<dataList.sizeRelationsList.length;i++){ | ||
86 | + // $("#select—size").append("<option value="+sizeRelationsList[i].sizeName+">"+sizeRelationsList[i].sizeName+"</option>"); | ||
87 | + // } | ||
88 | + // } | ||
90 | e.init(); | 89 | e.init(); |
91 | 90 | ||
92 | $(document).on('click', '#add-saveBtn', function () { | 91 | $(document).on('click', '#add-saveBtn', function () { |
-
Please register or login to post a comment