...
|
...
|
@@ -244,6 +244,7 @@ |
|
|
<!--begin:提示弹层-->
|
|
|
<div class="pop_fn"></div>
|
|
|
<script type="text/javascript" src="__TMPL__/public/assets/js/swiper.min.js"></script>
|
|
|
<script type="text/javascript" src="__TMPL__/public/assets/js/weui.js"></script>
|
|
|
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
|
|
|
<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=HGLBZ-WD66X-2H74V-TJ6NI-NHNWZ-DNBJ5"></script>
|
|
|
<script>
|
...
|
...
|
@@ -305,45 +306,136 @@ |
|
|
// console.log(month);
|
|
|
var day=date.getDate();
|
|
|
// console.log(day)
|
|
|
//开始时间
|
|
|
$('.start').on('click', function () {
|
|
|
weui.datePicker({
|
|
|
start: 2018 ,
|
|
|
end: 2030,
|
|
|
defaultValue:[year,month,day],
|
|
|
onChange: function (resulte) {
|
|
|
console.log(resulte);
|
|
|
start: new Date(),
|
|
|
end: new Date().getFullYear(),
|
|
|
defaultValue: [new Date().getFullYear(), new Date().getMonth() + 1, new Date().getDate()],
|
|
|
onConfirm: function(result) {
|
|
|
// 二级调用:时间
|
|
|
show_expect_time_picker(result);
|
|
|
$('.weui-picker').on('animationend webkitAnimationEnd', function() {
|
|
|
show_expect_time_picker(result);
|
|
|
});
|
|
|
},
|
|
|
onConfirm: function (result) {
|
|
|
console.log(result);
|
|
|
var date=result[0]+"年"+result[1]+"月"+result[2]+"日";
|
|
|
$(".start").html(date);
|
|
|
var attr = result[0]+'-'+result[1]+'-'+result[2];
|
|
|
$(".start").attr('index',attr);
|
|
|
|
|
|
}
|
|
|
});
|
|
|
className: 'order_day'
|
|
|
})
|
|
|
});
|
|
|
|
|
|
//结束时间
|
|
|
$('.end').on('click', function () {
|
|
|
weui.datePicker({
|
|
|
start: 2018,
|
|
|
end: 2030,
|
|
|
defaultValue:[year,month,day],
|
|
|
onChange: function (result) {
|
|
|
// console.log(result);
|
|
|
start: new Date(),
|
|
|
end: new Date().getFullYear(),
|
|
|
defaultValue: [new Date().getFullYear(), new Date().getMonth() + 1, new Date().getDate()],
|
|
|
onConfirm: function(result) {
|
|
|
// 二级调用:时间
|
|
|
show_expect_time_picker1(result);
|
|
|
$('.weui-picker').on('animationend webkitAnimationEnd', function() {
|
|
|
show_expect_time_picker1(result);
|
|
|
});
|
|
|
},
|
|
|
className: 'order_day'
|
|
|
})
|
|
|
});
|
|
|
// 开始时间组件选择时分
|
|
|
function show_expect_time_picker(date) {
|
|
|
var hours = [],
|
|
|
minites = [],
|
|
|
symbol = [{
|
|
|
label: ':',
|
|
|
value: 0
|
|
|
}];
|
|
|
var d = new Date();
|
|
|
var my_hours = d.getHours();
|
|
|
var my_minutes = d.getMinutes();
|
|
|
var date = date[0].value + '年' + (date[1].value>9?date[1].value:('0'+date[1].value)) + '月' + (date[2].value>9?date[2].value:('0'+date[2].value)) + '日';
|
|
|
if (!hours.length) {
|
|
|
for (var i = my_hours; i < 24; i++) {
|
|
|
var hours_item = {};
|
|
|
hours_item.label = ('' + i).length === 1 ? '0' + i : '' + i;
|
|
|
hours_item.value = i;
|
|
|
hours.push(hours_item);
|
|
|
}
|
|
|
}
|
|
|
if (!minites.length) {
|
|
|
for (var j = 0; j < 60; j++) {
|
|
|
var minites_item = {};
|
|
|
minites_item.label = ('' + j).length === 1 ? '0' + j : '' + j;
|
|
|
minites_item.value = j;
|
|
|
minites.push(minites_item);
|
|
|
}
|
|
|
}
|
|
|
weui.picker(hours, symbol, minites, {
|
|
|
defaultValue: [new Date().getHours(), 0, my_minutes],
|
|
|
onConfirm: function(result) {
|
|
|
var time = result[0].label + ':' + result[2].label;
|
|
|
var expect_date = date + ' ' + time;
|
|
|
var timestamp = Date.parse(new Date());
|
|
|
var choosetamp = Date.parse(expect_date);
|
|
|
console.log(expect_date)
|
|
|
$('.start').html(expect_date);
|
|
|
|
|
|
onConfirm: function (result) {
|
|
|
// console.log(result);
|
|
|
var date=result[0]+"年"+result[1]+"月"+result[2]+"日";
|
|
|
$(".end").html(date);
|
|
|
var attr = result[0]+'-'+result[1]+'-'+result[2];
|
|
|
$(".end").attr('index',attr);
|
|
|
|
|
|
// var date=result[0]+"年"+result[1]+"月"+result[2]+"日";
|
|
|
// $(".start").html(date);
|
|
|
var attr = result[0]+'-'+result[1]+'-'+result[2];
|
|
|
$(".start").attr('index',attr);
|
|
|
|
|
|
},
|
|
|
className: 'mytime'
|
|
|
});
|
|
|
}
|
|
|
//结束时间选择时分
|
|
|
function show_expect_time_picker1(date) {
|
|
|
var hours = [],
|
|
|
minites = [],
|
|
|
symbol = [{
|
|
|
label: ':',
|
|
|
value: 0
|
|
|
}];
|
|
|
var d = new Date();
|
|
|
var my_hours = d.getHours();
|
|
|
var my_minutes = d.getMinutes();
|
|
|
var date = date[0].value + '年' + (date[1].value>9?date[1].value:('0'+date[1].value)) + '月' + (date[2].value>9?date[2].value:('0'+date[2].value)) + '日';
|
|
|
if (!hours.length) {
|
|
|
for (var i = my_hours; i < 24; i++) {
|
|
|
var hours_item = {};
|
|
|
hours_item.label = ('' + i).length === 1 ? '0' + i : '' + i;
|
|
|
hours_item.value = i;
|
|
|
hours.push(hours_item);
|
|
|
}
|
|
|
}
|
|
|
if (!minites.length) {
|
|
|
for (var j = 0; j < 60; j++) {
|
|
|
var minites_item = {};
|
|
|
minites_item.label = ('' + j).length === 1 ? '0' + j : '' + j;
|
|
|
minites_item.value = j;
|
|
|
minites.push(minites_item);
|
|
|
}
|
|
|
}
|
|
|
weui.picker(hours, symbol, minites, {
|
|
|
defaultValue: [new Date().getHours(), 0, my_minutes],
|
|
|
onConfirm: function(result) {
|
|
|
var time = result[0].label + ':' + result[2].label;
|
|
|
var expect_date = date + ' ' + time;
|
|
|
var timestamp = Date.parse(new Date());
|
|
|
var choosetamp = Date.parse(expect_date);
|
|
|
// console.log(expect_date)
|
|
|
$(".end").html(expect_date)
|
|
|
// var date=result[0]+"年"+result[1]+"月"+result[2]+"日";
|
|
|
// $(".end").html(date);
|
|
|
var attr = result[0]+'-'+result[1]+'-'+result[2];
|
|
|
$(".end").attr('index',attr);
|
|
|
},
|
|
|
className: 'mytime'
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//提交时资料不完善
|
|
|
$(".mesub").click(function(){
|
|
|
var sel_id = $('#select').val();
|
...
|
...
|
|