Authored by 陶雨

限购码编辑修改时间控件问题,sku数量不能为0。修改host

... ... @@ -12,9 +12,6 @@ var limitDateToObj;
var Bll = {
__render:function() {
editBean.currTime = common.util.__dateFormat(new Date(), "yyyy-MM-dd hh:mm:ss");
if(new Date(editBean.currTime).getTime() > new Date(editBean.limitDateFrom)) {
editBean.useCurrTime = true;
}
$("#basicForm").html(common.util.__template2($("#limitcodeEdit-template").html(), editBean));
e.init();
limitDateFromObj = $("#limitDateFrom").fdatepicker({
... ... @@ -25,6 +22,14 @@ var Bll = {
format: 'yyyy-mm-dd hh:ii:ss',
pickTime: true
}).data("datepicker");
limitDateFromObj.setEndDate(editBean.limitDateTo);
if(editBean.limitDateFrom) {
limitDateToObj.setStartDate(editBean.currTime);
} else if(new Date(editBean.currTime).getTime() < new Date(editBean.limitDateFrom)){
limitDateToObj.setStartDate(editBean.limitDateFrom);
} else {
limitDateToObj.setStartDate(editBean.currTime);
}
if(type == "edit") {
$('input[name="skn_sku"]').prop('disabled', true);
$(".noEdit").prop("disabled", true);
... ... @@ -108,12 +113,10 @@ $(document).on("change", ".observe", function () {
if($this.prop("id") == "limitDateFrom" && new Date($this.val()).getTime() ) {
if(new Date(editBean.currTime).getTime() > new Date(editBean.limitDateFrom)) {
limitDateToObj.setStartDate(editBean.currTime);
editBean.useCurrTime = true;
} else {
limitDateToObj.setStartDate(editBean.limitDateFrom);
editBean.useCurrTime = false;
}
console.log(editBean.limitDateFrom);
//console.log(editBean.limitDateFrom);
}
//console.log(editBean);
... ... @@ -165,6 +168,14 @@ $(document).on("blur", "#limitSkn", function() {
$(document).on("click","#save_brand", function() {
// 限购码状态0:待审核 1:审核通过 2:驳回 3:过期 4:作废
if(e.validate() && (type == "add" ? (!editBean.limitSkn || !Bll.__checkSkn()) : true)) {
if(editBean.limitCodeType == "U") {
for (var i in editBean.skusInfo) {
if(!editBean.skusInfo[i].skuTimes) {
common.util.__tip("SKU数量不能为0");
return;
}
}
}
editBean.reqDepartment = editBean.reqDepartment.join("/");
editBean.creatorId = $("#auth_id").val();
editBean.creatorName = $("#auth_name").val();
... ...
... ... @@ -19,10 +19,10 @@ var config = {
// domain:'http://172.16.6.141:9090/',// 赵琪
// domain: 'http://172.16.6.214:8088/platform',//陈超
//http://172.16.6.124:8088/platform/product/queryAllProductAttr
domain: 'http://172.16.6.146:8088/platform', //玛丽
//domain: 'http://172.16.6.146:8088/platform', //玛丽
//domain:'http://172.16.6.157:8080/yohobuy-platform-web',//葛超
// domain: 'http://192.168.102.216:8086/platform',
// domain: 'http://192.168.102.202:8088/platform',
domain: 'http://192.168.102.202:8088/platform',
//domain: 'http://172.16.6.146:8088/platform',
//domain:'http://172.16.6.120:8088/platform',//曹艳
//domain:'http://172.16.6.231:8080/platform',//王伟
... ...