Authored by weiqingting

JIT商品修改

... ... @@ -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;
});
... ...
... ... @@ -143,7 +143,7 @@
<div class="form-group">
<label class="col-sm-2 control-label">商品名称<span class="red">*</span></label>
<div class="col-sm-3">
<input type="text" id="productName" class="form-control" value="[[productName]]" required/>
<input type="text" id="productName" class="form-control" value="[[productName]]" placeholder="品牌英文名+性别+最小类目" required/>
</div>
<label class="col-sm-1 control-label">厂家编号</label>
<div class="col-sm-1">
... ...
... ... @@ -35,11 +35,11 @@
<div class="panel-col">
<input type="text" id="productName" class="form-control" placeholder="商品名称" style="height: 39px;"/>
</div>
<div class="panel-col">
<!-- <div class="panel-col">
<select id="founder" class="form-control">
<option value="-1">供应商</option>
<option value="-1">创建人</option>
</select>
</div>
</div> -->
<div class="panel-col">
<select id="shopId" class="form-control">
<option value="-1">请选择店铺</option>
... ... @@ -76,7 +76,7 @@
</select>
</div>
<div class="panel-col" style="width:300px">
<div class="panel-col">
<div id="sort"></div>
</div>
<div class="panel-col">
... ...