...
|
...
|
@@ -41,7 +41,9 @@ var Bll={ |
|
|
},
|
|
|
productNameArr:['','',''],
|
|
|
setProductName:function(){
|
|
|
$("#productName").val(Bll.productNameArr.join("-"));
|
|
|
if(!param){
|
|
|
$("#productName").val(Bll.productNameArr.join(""));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -286,43 +288,51 @@ e.on("validate",function(){ |
|
|
if((+$("#salesPriceStr").val())>(+$("#retailPriceStr").val())){
|
|
|
return "销售价应该限定小于等于吊牌价";
|
|
|
}
|
|
|
})
|
|
|
});
|
|
|
//
|
|
|
|
|
|
$(document).on("click","#btnReview",function(){
|
|
|
e.submit($("#basicForm").attr("action"),function(option){
|
|
|
var select=tabTree.getAddress();
|
|
|
|
|
|
option.data.supplierId=common.util.__input("supplierId")?$("#supplierId").val():"0";
|
|
|
|
|
|
option.data.productSkn=param?param[2]:"";
|
|
|
option.data.maxSortId=select[0]?select[0].id:"";
|
|
|
option.data.middleSortId=select[1]?select[1].id:"";
|
|
|
option.data.smallSortId=select[2]?select[2].id:"";
|
|
|
|
|
|
option.data.shopId=$("#shopId").val();
|
|
|
option.data.brandId=$("#brandId").val();
|
|
|
option.data.supplierId=$("#supplierId").val();
|
|
|
|
|
|
option.data.isAuditing=RESPONSEDATA.isAuditing?RESPONSEDATA.isAuditing:"";
|
|
|
|
|
|
//expectShelfTime
|
|
|
// option.data=new Date(expectShelfTime).getTime();
|
|
|
|
|
|
option.data.baseGoodInfoStr=JSON.stringify(g.__rows);
|
|
|
// option.debug=true;
|
|
|
console.log(option.data);
|
|
|
option.success=function(res){
|
|
|
res = res.data;
|
|
|
if(res.code == "200") {
|
|
|
e.$tip("提交成功", function() {
|
|
|
location.href="/supplier/baseproduct/index"
|
|
|
}, 'growl-success');
|
|
|
}else{
|
|
|
e.$tip(res.message);
|
|
|
}
|
|
|
},
|
|
|
option.error=function(res){
|
|
|
e.$tip(res.message);
|
|
|
}
|
|
|
});
|
|
|
if(e.validate()){
|
|
|
common.dialog.confirm("温馨提示","<p>若是JIT商品,请务必选择供应商!</p><p>你确定提交吗?</p>",function(){
|
|
|
e.submit($("#basicForm").attr("action"),function(option){
|
|
|
var select=tabTree.getAddress();
|
|
|
|
|
|
option.data.supplierId=common.util.__input("supplierId")?$("#supplierId").val():"0";
|
|
|
option.data.shopId=common.util.__input("shopId")?$("#shopId").val():"0";
|
|
|
|
|
|
option.data.productSkn=param?param[2]:"";
|
|
|
option.data.maxSortId=select[0]?select[0].id:"";
|
|
|
option.data.middleSortId=select[1]?select[1].id:"";
|
|
|
option.data.smallSortId=select[2]?select[2].id:"";
|
|
|
|
|
|
// option.data.shopId=$("#shopId").val();
|
|
|
option.data.brandId=$("#brandId").val();
|
|
|
|
|
|
option.data.isAuditing=RESPONSEDATA.isAuditing?RESPONSEDATA.isAuditing:"";
|
|
|
|
|
|
//expectShelfTime
|
|
|
// option.data=new Date(expectShelfTime).getTime();
|
|
|
|
|
|
option.data.baseGoodInfoStr=JSON.stringify(g.__rows);
|
|
|
// option.debug=true;
|
|
|
console.log(option.data);
|
|
|
option.success=function(res){
|
|
|
res = res.data;
|
|
|
if(res.code == "200") {
|
|
|
e.$tip("提交成功", function() {
|
|
|
location.href="/supplier/baseproduct/index"
|
|
|
}, 'growl-success');
|
|
|
}else{
|
|
|
e.$tip(res.message);
|
|
|
}
|
|
|
},
|
|
|
option.error=function(res){
|
|
|
e.$tip(res.message);
|
|
|
}
|
|
|
});
|
|
|
})
|
|
|
}
|
|
|
|
|
|
return false;
|
|
|
}); |
...
|
...
|
|