Authored by linlong

update

... ... @@ -57,5 +57,5 @@ module.exports=function(app) {
app.post("/profile/queryUserProfileByRole","select_queryUserProfileByRole");
app.post("/model/queryModelListForSelect","select_queryModelListForSelect");
app.post("/productSize/queryProdSizeListForSel","select_queryProdSizeListForSel");
}
\ No newline at end of file
... ...
... ... @@ -214,5 +214,12 @@ module.exports={
roleName:{type:String}
}
},
queryProdSizeListForSel:{
title:'获取商品尺寸',
url: '/productSize/queryProdSizeListForSel',
params: {
productSkn:{type:Number}
}
},
}
};
\ No newline at end of file
... ...
... ... @@ -10,14 +10,13 @@
<div class="panel-body">
<h4>模特卡</h4>
<p>
<select class="form-control " id='select—model' required placeholder="选择模特" style="width:200px;">
<select class="form-control " id='select—model' placeholder="选择模特" style="width:200px;">
<option value="-1">选择模特</option>
</select>
<select class="form-control" id='select—size' required placeholder="选择尺寸" style="width:200px;">
<select class="form-control" id='select—size' placeholder="选择尺寸" style="width:200px;">
<option value="-1">选择尺寸</option>
</select>
<button type="button" class="btn btn-info btn-xs btn-sort-add" id='btn-model-add' data-index=[[index]] style="float:left;">+</button>
</p>
... ...
... ... @@ -183,6 +183,10 @@ module.exports = {
queryModelListForSelect:{
title: "获取模特姓名",
url: "/model/queryModelListForSelect"
},
queryModelListForSelect:{
title: "获取商品尺寸",
url: "/productSize/queryProdSizeListForSel"
}
}
};
\ No newline at end of file
... ...
... ... @@ -56,7 +56,8 @@ var urlObj = {
'userProfileByRole':"/profile/queryUserProfileByRole",
'queryModelListForSelect':"/model/queryModelListForSelect"
'queryModelListForSelect':"/model/queryModelListForSelect",
'queryProdSizeListForSel':"/productSize/queryProdSizeListForSel"
};
var minimumResultsForSearch = ["sortbybrand", "getjitSup", "sortsize2", "querySupplier"];
... ...
... ... @@ -16,11 +16,7 @@ if ($('.contentpanel').data('type') == 'info') {
$("#productSkn").val(window.NETSALEDATA.baseProductInfo.baseProduct.productSkn);
console.log(window.NETSALEDATA);
new common.dropDown({
el: '#select—model',
ajax: 'queryModelListForSelect',
hash: true
});
// window.GOLABDATA = {
// on: function(key, callback) {
... ...
... ... @@ -8,6 +8,15 @@ new common.dropDown({
hash: true
});
new common.dropDown({
el: '#select—size',
ajax: 'queryProdSizeListForSel',
hash: true,
params:function(){
return{productSkn:NETSALEDATA.baseProductInfo.baseProduct.productSkn}
}
});
var modelCardTable = new common.grid({
el: "#model-card",
hash: false,
... ... @@ -32,6 +41,14 @@ $(document).on('click', '#btn-model-add', function () {
var productSkn = NETSALEDATA.baseProductInfo.baseProduct.productSkn;
var modelCardId = $("#select—model").val();
var size = $("#select—size").val();
if(modelCardId==-1){
common.util.__tip("模特姓名不能为空");
return false;
}
if(size==-1){
common.util.__tip("商品尺寸不能为空");
return false;
}
common.util.__ajax({
url: '/goods/product/addproductModelCard',
data: {
... ...
... ... @@ -79,14 +79,13 @@ if (window.NETSALEDATA) {
var e = new common.edit("#add-list");
dataList = res.data.list[0];
common.sizeInfo.list(dataList);
console.info(dataList.sizeRelationsList)
$("#noMeasureIds").val(dataList.noMeasureIds ? dataList.noMeasureIds.join("|") : "");
if(dataList.sizeRelationsList!=""){
var sizeRelationsList = dataList.sizeRelationsList;
for(var i=0;i<dataList.sizeRelationsList.length;i++){
$("#select—size").append("<option value="+sizeRelationsList[i].sizeName+">"+sizeRelationsList[i].sizeName+"</option>");
}
}
// if(dataList.sizeRelationsList!=""){
// var sizeRelationsList = dataList.sizeRelationsList;
// for(var i=0;i<dataList.sizeRelationsList.length;i++){
// $("#select—size").append("<option value="+sizeRelationsList[i].sizeName+">"+sizeRelationsList[i].sizeName+"</option>");
// }
// }
e.init();
$(document).on('click', '#add-saveBtn', function () {
... ...