...
|
...
|
@@ -11,7 +11,7 @@ var canEditSort = true; // 未上架前可修改2,3级类目 |
|
|
|
|
|
/*类目配置*/
|
|
|
var ENUM={
|
|
|
goodsSizeList:{"sizeId":"","salePrice":$("#salesPriceStr").val(),"factoryCode":"","isSuppled":"Y","upmCode":""}
|
|
|
goodsSizeList:{"sizeId":"","salePrice":$("#salesPriceStr").val(),"factoryCode":"","isSuppled":"Y","upmCode":"","balanceTimeStr":""}
|
|
|
};
|
|
|
|
|
|
if(ViewModel.data){ // 编辑状态下有数据
|
...
|
...
|
@@ -21,6 +21,24 @@ if(ViewModel.data){ // 编辑状态下有数据 |
|
|
if(!RESPONSEDATA.expectShelfTimeStr){
|
|
|
RESPONSEDATA.expectShelfTimeStr="2016-04-15 00:00:00";
|
|
|
}
|
|
|
|
|
|
// 处理SKU中的支付尾款时间
|
|
|
var baseGoodList = RESPONSEDATA.baseGoodList;
|
|
|
if(baseGoodList) {
|
|
|
$.each(baseGoodList, function(index, baseGood) {
|
|
|
var goodsSizeList = baseGood.goodsSizeList;
|
|
|
if(goodsSizeList) {
|
|
|
$.each(goodsSizeList, function(index, goodsSize) {
|
|
|
var balanceTimeStr = '0';
|
|
|
if(goodsSize.balanceTime) {
|
|
|
balanceTimeStr = new Date(goodsSize.balanceTime * 1000).toLocaleString();
|
|
|
}
|
|
|
|
|
|
goodsSize.balanceTimeStr = balanceTimeStr;
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/*货品年,规则从2015年开始,到今年之后的10年*/
|
...
|
...
|
@@ -118,6 +136,11 @@ if(RESPONSEDATA.isAuditing==200){ |
|
|
.add("#retailPriceStr").add("#salesPriceStr").add("#stock")
|
|
|
.prop("disabled",true);
|
|
|
//.add("#expectShelfTimeStr").add("#expectArrivalTimeStr")
|
|
|
|
|
|
// 展示预计上架时间和设置定金
|
|
|
if(RESPONSEDATA.isAdvance === 'Y') {
|
|
|
$('#advanceSettings').show();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/*下拉选择*/
|
...
|
...
|
@@ -177,7 +200,7 @@ var g=new common.grid({ |
|
|
}
|
|
|
var html=[];
|
|
|
html.push("<div class='form-group' style='padding-bottom: 0'><div class='col-sm-11 red'><input type=text value='"+item.factoryCode+"' data-index="+item.__index+" class='modelCode form-control' placeholder='款型编码' /></div></div>");
|
|
|
html.push("<dov class='rows'><div class='form-group' style='padding-bottom: 0'><div class='col-sm-2'>尺码</div><div class='col-sm-2'>销售价</div><div class='col-sm-2'>条码</div><div class='col-sm-2'>是否补货</div><div class='col-sm-2'>UPM条码</div></div></div>");
|
|
|
html.push("<div class='rows'><div class='form-group' style='padding-bottom: 0'><div class='col-sm-2'>尺码</div><div class='col-sm-2'>销售价</div><div class='col-sm-2'>条码</div><div class='col-sm-1'>是否补货</div><div class='col-sm-2'>UPM条码</div><div class='col-sm-2'>支付尾款时间</div></div></div>");
|
|
|
html.push('<div class="rows" id="rows__'+item.__index+'">');
|
|
|
item.goodsSizeList=item.goodsSizeList||[$.extend({},ENUM.goodsSizeList)];
|
|
|
html.push(common.util.__template2($("#template").html(),{index:item.__index,goodsSizeList:item.goodsSizeList}));
|
...
|
...
|
@@ -318,11 +341,11 @@ $(document).on("change",":radio[name=isAdvance]",function(){ |
|
|
// });
|
|
|
// });
|
|
|
if($(this).val()=="Y"){
|
|
|
$("#advanceSettings").show();
|
|
|
$("#expectArrivalTimeStr").attr("required","required");
|
|
|
$("#expectArrivalTimeStrTxt").html("预计到货时间<span class='red'>*</span>");
|
|
|
}else{
|
|
|
$("#advanceSettings").hide();
|
|
|
$("#expectArrivalTimeStr").removeAttr("required");
|
|
|
$("#expectArrivalTimeStrTxt").html("预计到货时间");
|
|
|
}
|
|
|
});
|
|
|
$(document).on("change",".salesPriceStr",function(){
|
...
|
...
|
@@ -513,6 +536,12 @@ e.on("validate",function(){ |
|
|
}
|
|
|
});
|
|
|
|
|
|
e.on("validate",function(){
|
|
|
if((+$("#deposit").val())>=(+$("#salesPriceStr").val())){
|
|
|
return "预付定金应小于销售价";
|
|
|
}
|
|
|
});
|
|
|
|
|
|
/*非销售属性验证*/
|
|
|
// e.on("validate",function(){
|
|
|
// if(!ag.__edit.validate(true)){
|
...
|
...
|
|