|
@@ -6,6 +6,8 @@ var e = new common.edit2("#basicForm"); |
|
@@ -6,6 +6,8 @@ var e = new common.edit2("#basicForm"); |
6
|
var type = $("#basicForm").attr("role"),
|
6
|
var type = $("#basicForm").attr("role"),
|
7
|
action = $("#basicForm").data("action");
|
7
|
action = $("#basicForm").data("action");
|
8
|
var isFirst = true;
|
8
|
var isFirst = true;
|
|
|
9
|
+var limitDateFromObj;
|
|
|
10
|
+var limitDateToObj;
|
9
|
|
11
|
|
10
|
var Bll = {
|
12
|
var Bll = {
|
11
|
__render:function() {
|
13
|
__render:function() {
|
|
@@ -15,6 +17,14 @@ var Bll = { |
|
@@ -15,6 +17,14 @@ var Bll = { |
15
|
}
|
17
|
}
|
16
|
$("#basicForm").html(common.util.__template2($("#limitcodeEdit-template").html(), editBean));
|
18
|
$("#basicForm").html(common.util.__template2($("#limitcodeEdit-template").html(), editBean));
|
17
|
e.init();
|
19
|
e.init();
|
|
|
20
|
+ limitDateFromObj = $("#limitDateFrom").fdatepicker({
|
|
|
21
|
+ format: 'yyyy-mm-dd hh:ii:ss',
|
|
|
22
|
+ pickTime: true
|
|
|
23
|
+ }).data("datepicker");
|
|
|
24
|
+ limitDateToObj = $("#limitDateTo").fdatepicker({
|
|
|
25
|
+ format: 'yyyy-mm-dd hh:ii:ss',
|
|
|
26
|
+ pickTime: true
|
|
|
27
|
+ }).data("datepicker");
|
18
|
if(type == "edit") {
|
28
|
if(type == "edit") {
|
19
|
$('input[name="skn_sku"]').prop('disabled', true);
|
29
|
$('input[name="skn_sku"]').prop('disabled', true);
|
20
|
$(".noEdit").prop("disabled", true);
|
30
|
$(".noEdit").prop("disabled", true);
|
|
@@ -97,11 +107,14 @@ $(document).on("change", ".observe", function () { |
|
@@ -97,11 +107,14 @@ $(document).on("change", ".observe", function () { |
97
|
});
|
107
|
});
|
98
|
if($this.prop("id") == "limitDateFrom" && new Date($this.val()).getTime() ) {
|
108
|
if($this.prop("id") == "limitDateFrom" && new Date($this.val()).getTime() ) {
|
99
|
if(new Date(editBean.currTime).getTime() > new Date(editBean.limitDateFrom)) {
|
109
|
if(new Date(editBean.currTime).getTime() > new Date(editBean.limitDateFrom)) {
|
|
|
110
|
+ limitDateToObj.setStartDate(editBean.currTime);
|
100
|
editBean.useCurrTime = true;
|
111
|
editBean.useCurrTime = true;
|
101
|
} else {
|
112
|
} else {
|
|
|
113
|
+ limitDateToObj.setStartDate(editBean.limitDateFrom);
|
102
|
editBean.useCurrTime = false;
|
114
|
editBean.useCurrTime = false;
|
103
|
}
|
115
|
}
|
104
|
- Bll.__render();
|
116
|
+ console.log(editBean.limitDateFrom);
|
|
|
117
|
+
|
105
|
}
|
118
|
}
|
106
|
//console.log(editBean);
|
119
|
//console.log(editBean);
|
107
|
});
|
120
|
});
|