...
|
...
|
@@ -60,16 +60,17 @@ |
|
|
<div class="log_three_model">
|
|
|
<div class="log_three_model_one time">
|
|
|
<div class="log_three_model_left">配送时间</div>
|
|
|
<div class="log_psong">
|
|
|
<input type="text" id="start_time" value="" placeholder="请输入开始配送时间"/>
|
|
|
<div class="log_psong tongyi_start_time" style="color: #CCCCCC;">
|
|
|
请选择配送到达时间
|
|
|
</div>
|
|
|
<input type="hidden" id="start_time" value="" placeholder="请输入开配送时间"/>
|
|
|
</div>
|
|
|
<div class="log_three_model_one time">
|
|
|
<!--<div class="log_three_model_one time">
|
|
|
<div class="log_three_model_left">配送时间</div>
|
|
|
<div class="log_psong">
|
|
|
<input type="text" id="end_time" value="" placeholder="请输入结束配送时间"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>-->
|
|
|
<div class="log_three_model_one logistic">
|
|
|
<div class="log_three_model_left">选择快递</div>
|
|
|
<div class="log_psong log_psong_select">
|
...
|
...
|
@@ -168,7 +169,7 @@ |
|
|
<img src="__TMPL__/public/assets/images/29.png" alt=""/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<else />
|
|
|
<else/>
|
|
|
<div class="log_four_input_one">
|
|
|
<div class="log_four_input_one_left">
|
|
|
地区
|
...
|
...
|
@@ -268,7 +269,7 @@ |
|
|
<!-- 底部按钮 -->
|
|
|
<div class="log_seven_btn log_seven_btn9" style="margin-top: 0.36rem;">
|
|
|
<if condition="$data.state eq 2">
|
|
|
<div class="log_seven_btn_contant send" data-is_courier="{$data.is_courier}" data-indent-id="{$data.id}" >
|
|
|
<div class="log_seven_btn_contant send" data-is_courier="{$data.is_courier}" data-indent-id="{$data.id}">
|
|
|
立即发货
|
|
|
</div>
|
|
|
<elseif condition="$data.state eq 5"/>
|
...
|
...
|
@@ -288,92 +289,122 @@ |
|
|
function zZFun(e) {
|
|
|
window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
|
|
|
}
|
|
|
//选择快递方式
|
|
|
$(".log_psong_select").click(function () {
|
|
|
$(".tx_mask_kuaidi").css({
|
|
|
display: "block"
|
|
|
|
|
|
//选择快递方式
|
|
|
$(".log_psong_select").click(function () {
|
|
|
$(".tx_mask_kuaidi").css({
|
|
|
display: "block"
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
$(".tx_mask_kuaidi .three_model_school_name").click(function () {
|
|
|
var index = $(this).index();
|
|
|
$(this).addClass('there_unActive').siblings().removeClass('there_unActive');
|
|
|
$('.log_ps_title').text($(this).text()).css("color", "#333");
|
|
|
$(".tx_mask_kuaidi").hide();
|
|
|
$('#logistic_name').val($(this).attr('data-name'))
|
|
|
});
|
|
|
$(function(){
|
|
|
$('body').on('click','.send',function(){
|
|
|
var indent_id = $(this).attr('data-indent-id');
|
|
|
var is_courier = $(this).attr('data-is_courier');
|
|
|
console.log(indent_id);
|
|
|
console.log(is_courier);
|
|
|
if (is_courier == 1) {
|
|
|
//统一配送
|
|
|
$('.time').show();
|
|
|
$('.logistic').hide();
|
|
|
} else if (is_courier == 2) {
|
|
|
//快递
|
|
|
$('.time').hide();
|
|
|
$('.logistic').show();
|
|
|
}
|
|
|
$('.tx_maskone').show();
|
|
|
$('.confirm').attr('data-indent-id',indent_id);
|
|
|
$('.confirm').attr('data-is_courier',is_courier);
|
|
|
$(".tx_mask_kuaidi .three_model_school_name").click(function () {
|
|
|
var index = $(this).index();
|
|
|
$(this).addClass('there_unActive').siblings().removeClass('there_unActive');
|
|
|
$('.log_ps_title').text($(this).text()).css("color", "#333");
|
|
|
$(".tx_mask_kuaidi").hide();
|
|
|
$('#logistic_name').val($(this).attr('data-name'))
|
|
|
});
|
|
|
$('body').on('click','.confirm',function(){
|
|
|
var is_courier = $(this).attr('data-is_courier');
|
|
|
var indent_id = $(this).attr('data-indent-id');
|
|
|
var logistic_name = $('#logistic_name').val();
|
|
|
var logistic_code = $('#logistic_code').val();
|
|
|
var start_time = $('#start_time').val();
|
|
|
var end_time = $('#end_time').val();
|
|
|
if (is_courier == 1) {
|
|
|
if (start_time == '') {
|
|
|
alert('请填写配送时间');
|
|
|
return false;
|
|
|
} else if (end_time == '') {
|
|
|
alert('请填写配送时间');
|
|
|
return false;
|
|
|
$(function () {
|
|
|
$('body').on('click', '.send', function () {
|
|
|
var indent_id = $(this).attr('data-indent-id');
|
|
|
var is_courier = $(this).attr('data-is_courier');
|
|
|
console.log(indent_id);
|
|
|
console.log(is_courier);
|
|
|
if (is_courier == 1) {
|
|
|
//统一配送
|
|
|
$('.time').show();
|
|
|
$('.logistic').hide();
|
|
|
} else if (is_courier == 2) {
|
|
|
//快递
|
|
|
$('.time').hide();
|
|
|
$('.logistic').show();
|
|
|
}
|
|
|
} else if (is_courier == 2) {
|
|
|
if (logistic_name == '') {
|
|
|
alert('请填写快递公司');
|
|
|
return false;
|
|
|
} else if (logistic_code == '') {
|
|
|
alert('请填写快递单号');
|
|
|
$('.tx_maskone').show();
|
|
|
$('.confirm').attr('data-indent-id', indent_id);
|
|
|
$('.confirm').attr('data-is_courier', is_courier);
|
|
|
});
|
|
|
$('.confirm').click(function () {
|
|
|
var is_courier = $(this).attr('data-is_courier');
|
|
|
var indent_id = $(this).attr('data-indent-id');
|
|
|
var logistic_name = $('#logistic_name').val();
|
|
|
var logistic_code = $('#logistic_code').val();
|
|
|
var start_time = $('#start_time').val();
|
|
|
// var end_time = $('#end_time').val();
|
|
|
if (is_courier == 1) {
|
|
|
if (start_time == '') {
|
|
|
alert('请填写配送时间');
|
|
|
return false;
|
|
|
}
|
|
|
// else if (end_time == '') {
|
|
|
// alert('请填写配送时间');
|
|
|
// return false;
|
|
|
// }
|
|
|
} else if (is_courier == 2) {
|
|
|
if (logistic_name == '') {
|
|
|
alert('请填写快递公司');
|
|
|
return false;
|
|
|
} else if (logistic_code == '') {
|
|
|
alert('请填写快递单号');
|
|
|
return false;
|
|
|
}
|
|
|
} else if (is_courier == '') {
|
|
|
alert('未知错误');
|
|
|
return false;
|
|
|
}
|
|
|
} else if (is_courier == '') {
|
|
|
alert('未知错误');
|
|
|
return false;
|
|
|
}
|
|
|
$.ajax({
|
|
|
url:"{:url('send')}",
|
|
|
type:"GET",
|
|
|
data:{'indent_id':indent_id,'is_courier':is_courier,'logistic_name':logistic_name,'logistic_code':logistic_code,'start_time':start_time,'end_time':end_time},
|
|
|
success:function(res){
|
|
|
console.log(res);
|
|
|
if (res.code == 1) {
|
|
|
$('.order_' + indent_id).remove();
|
|
|
$(".tx_maskone").css({
|
|
|
display: "none"
|
|
|
});
|
|
|
$(".tx_mask").css({
|
|
|
display: "none"
|
|
|
});
|
|
|
$('.send').remove();
|
|
|
var html = "<a href=\"{:url('logistics/index','',false,true)}/indent_id/"+indent_id+"\">\n" +
|
|
|
" <div class=\"log_seven_btn_contant\">\n" +
|
|
|
" 查看物流\n" +
|
|
|
" </div>\n" +
|
|
|
" </a>";
|
|
|
$('.log_seven_btn9').html(html)
|
|
|
$.ajax({
|
|
|
url: "{:url('send')}",
|
|
|
type: "GET",
|
|
|
data: {
|
|
|
'indent_id': indent_id,
|
|
|
'is_courier': is_courier,
|
|
|
'logistic_name': logistic_name,
|
|
|
'logistic_code': logistic_code,
|
|
|
'start_time': start_time,
|
|
|
// 'end_time': end_time
|
|
|
},
|
|
|
success: function (res) {
|
|
|
console.log(res);
|
|
|
if (res.code == 1) {
|
|
|
$('.order_' + indent_id).remove();
|
|
|
$(".tx_maskone").css({
|
|
|
display: "none"
|
|
|
});
|
|
|
$(".tx_mask").css({
|
|
|
display: "none"
|
|
|
});
|
|
|
$('.send').remove();
|
|
|
var html = "<a href=\"{:url('logistics/index','',false,true)}/indent_id/" + indent_id + "\">\n" +
|
|
|
" <div class=\"log_seven_btn_contant\">\n" +
|
|
|
" 查看物流\n" +
|
|
|
" </div>\n" +
|
|
|
" </a>";
|
|
|
$('.log_seven_btn9').html(html)
|
|
|
window.location.href = "{:url('get_all')}";
|
|
|
}
|
|
|
alert(res.msg)
|
|
|
}
|
|
|
alert(res.msg)
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
</script>
|
|
|
<script>
|
|
|
var dtpicker = new mui.DtPicker({
|
|
|
type: "datetime", //设置日历初始视图模式
|
|
|
beginDate: new Date(), //设置开始日期
|
|
|
labels: ['年', '月', '日', '时', '分', '秒'], //设置默认标签区域提示语
|
|
|
})
|
|
|
//统一配送选择时间
|
|
|
$(".tongyi_start_time").click(function () {
|
|
|
dtpicker.show(function (e) {
|
|
|
console.log(e);
|
|
|
$('.tongyi_start_time').text(e.text);
|
|
|
$('#start_time').val(e.text);
|
|
|
$('.tongyi_start_time').css('color', '#333333');
|
|
|
});
|
|
|
})
|
|
|
|
|
|
function zZFun(e) {
|
|
|
window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
|
|
|
}
|
|
|
</script>
|
|
|
</body>
|
|
|
|
...
|
...
|
|