...
|
...
|
@@ -10,6 +10,16 @@ |
|
|
<link rel="stylesheet" href="__TMPL__/public/assets/css/mui.picker.min.css"/>
|
|
|
<link rel="stylesheet" href="__TMPL__/public/assets/css/reset.css"/>
|
|
|
<link rel="stylesheet" href="__TMPL__/public/assets/css/log.css"/>
|
|
|
<style>
|
|
|
.tx_masktwo {
|
|
|
display: none;
|
|
|
z-index: 2;
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
position: fixed;
|
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
|
}
|
|
|
</style>
|
|
|
</head>
|
|
|
|
|
|
<body>
|
...
|
...
|
@@ -81,42 +91,67 @@ |
|
|
</div>
|
|
|
<!-- 弹窗 -->
|
|
|
<!--<div class="tx_mask">-->
|
|
|
<!--<div class="tx_maskCon">-->
|
|
|
<!--<div class="tx_maskConImg">-->
|
|
|
<!--<img src="__TMPL__/public/assets/images/90.png" alt=""/>-->
|
|
|
<!--</div>-->
|
|
|
<!--<div class="tx_maskCon2">-->
|
|
|
<!--<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" value="" placeholder="请输入开始配送时间"/>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--<div class="log_three_model_one time">-->
|
|
|
<!--<div class="log_three_model_left">配送时间</div>-->
|
|
|
<!--<div class="log_psong">-->
|
|
|
<!--<input type="text" value="" placeholder="请输入结束配送时间"/>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--<div class="log_three_model_one time">-->
|
|
|
<!--<div class="log_three_model_left">快递公司</div>-->
|
|
|
<!--<div class="log_psong">-->
|
|
|
<!--<input type="text" value="" placeholder="请输入快递公司"/>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--<div class="log_three_model_one time">-->
|
|
|
<!--<div class="log_three_model_left">快递单号</div>-->
|
|
|
<!--<div class="log_psong">-->
|
|
|
<!--<input type="text" value="" placeholder="请输入快递单号"/>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--<!– 确定 –>-->
|
|
|
<!--<div class="tx_maskOk confirm" data-id="">确定</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--<div class="tx_maskCon">-->
|
|
|
<!--<div class="tx_maskConImg">-->
|
|
|
<!--<img src="__TMPL__/public/assets/images/90.png" alt=""/>-->
|
|
|
<!--</div>-->
|
|
|
<!--<div class="tx_maskCon2">-->
|
|
|
<!--<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" value="" placeholder="请输入开始配送时间"/>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--<div class="log_three_model_one time">-->
|
|
|
<!--<div class="log_three_model_left">配送时间</div>-->
|
|
|
<!--<div class="log_psong">-->
|
|
|
<!--<input type="text" value="" placeholder="请输入结束配送时间"/>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--<div class="log_three_model_one time">-->
|
|
|
<!--<div class="log_three_model_left">快递公司</div>-->
|
|
|
<!--<div class="log_psong">-->
|
|
|
<!--<input type="text" value="" placeholder="请输入快递公司"/>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--<div class="log_three_model_one time">-->
|
|
|
<!--<div class="log_three_model_left">快递单号</div>-->
|
|
|
<!--<div class="log_psong">-->
|
|
|
<!--<input type="text" value="" placeholder="请输入快递单号"/>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--<!– 确定 –>-->
|
|
|
<!--<div class="tx_maskOk confirm" data-id="">确定</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<div class="tx_masktwo" style="display: none;">
|
|
|
<div class="tx_maskCon">
|
|
|
<div class="tx_maskConImg">
|
|
|
<img src="__TMPL__/public/assets/images/91.png" alt=""/>
|
|
|
</div>
|
|
|
<div class="tx_maskCon2">
|
|
|
<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_time2" value="" placeholder="请输入开始配送时间"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="log_three_model_one time">
|
|
|
<div class="log_three_model_left">配送时间</div>
|
|
|
<div class="log_psong">
|
|
|
<input type="text" id="end_time2" value="" placeholder="请输入结束配送时间"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 确定 -->
|
|
|
<div class="tx_maskOk confirm2" data-is_courier="" data-id="" data-indent-id="">确定</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="tx_maskone">
|
|
|
<div class="tx_maskCon">
|
|
|
<div class="tx_maskConImg">
|
...
|
...
|
@@ -137,17 +172,17 @@ |
|
|
</div>
|
|
|
</div>
|
|
|
<!--<div class="log_three_model_one logistic" style="padding-bottom: 0;">-->
|
|
|
<!--<div class="log_three_model_left" style="margin-top: -0.3rem;">快递公司</div>-->
|
|
|
<!--<div class="log_three_model_right">-->
|
|
|
<!--<input type="text" id="logistic_name" placeholder="请输入快递公司"/>-->
|
|
|
<!--</div>-->
|
|
|
<!--<div class="log_three_model_left" style="margin-top: -0.3rem;">快递公司</div>-->
|
|
|
<!--<div class="log_three_model_right">-->
|
|
|
<!--<input type="text" id="logistic_name" placeholder="请输入快递公司"/>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
<div class="log_three_model_one logistic">
|
|
|
<div class="log_three_model_left">选择快递</div>
|
|
|
<div class="log_psong log_psong_select">
|
|
|
<div class="log_ps_title">请选择</div>
|
|
|
<div class="log_ps_img">
|
|
|
<img src="__TMPL__/public/assets/images/29.png" />
|
|
|
<img src="__TMPL__/public/assets/images/29.png"/>
|
|
|
<input type="hidden" id="logistic_name" placeholder="请选择快递公司"/>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -215,7 +250,8 @@ |
|
|
<div class="log_three_list_top_left">
|
|
|
<if condition="$vo.is_courier eq 1">
|
|
|
<div class="log_three_list_top_lo">
|
|
|
<img src="__TMPL__/public/assets/images/fangkuang.png" alt=""/>
|
|
|
<img src="__TMPL__/public/assets/images/fangkuang.png"
|
|
|
data-indent-id="{$vo['id']}" alt=""/>
|
|
|
</div>
|
|
|
</if>
|
|
|
<div class="log_three_list_top_lt">
|
...
|
...
|
@@ -237,24 +273,27 @@ |
|
|
</if>
|
|
|
</div>
|
|
|
</div>
|
|
|
<foreach name="$vo.indent_goods" item="i_g">
|
|
|
<div class="log_three_list_center">
|
|
|
<div class="log_three_list_center_left">
|
|
|
<img src="{:cmf_get_image_url($i_g.thumbnail)}" alt=""/>
|
|
|
</div>
|
|
|
<div class="log_three_list_center_right">
|
|
|
<div class="log_three_center_one">
|
|
|
{$i_g.book_name}
|
|
|
<a href="{:url('get_one',array('id'=>$vo['id']))}">
|
|
|
<foreach name="$vo.indent_goods" item="i_g">
|
|
|
<div class="log_three_list_center">
|
|
|
<div class="log_three_list_center_left">
|
|
|
<img src="{:cmf_get_image_url($i_g.thumbnail)}" alt=""/>
|
|
|
</div>
|
|
|
<div class="log_three_list_center_right">
|
|
|
<div class="log_three_center_one">
|
|
|
{$i_g.book_name}
|
|
|
</div>
|
|
|
<div class="log_three_center_two">×{$i_g.number}</div>
|
|
|
<div class="log_three_center_three"><span>¥</span>{$i_g.price*$i_g.number}</div>
|
|
|
</div>
|
|
|
<div class="log_three_center_two">×{$i_g.number}</div>
|
|
|
<div class="log_three_center_three"><span>¥</span>{$i_g.price*$i_g.number}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</foreach>
|
|
|
</foreach>
|
|
|
</a>
|
|
|
<!-- 立即发货 -->
|
|
|
<div class="log_three_bottom_btn">
|
|
|
<if condition="$vo.state eq 2">
|
|
|
<div class="log_three_bottom send" data-indent-id="{$vo.id}" data-is_courier="{$vo.is_courier}">
|
|
|
<div class="log_three_bottom send" data-indent-id="{$vo.id}"
|
|
|
data-is_courier="{$vo.is_courier}">
|
|
|
立即发货
|
|
|
</div>
|
|
|
<elseif condition="$vo.state eq 5"/>
|
...
|
...
|
@@ -284,7 +323,8 @@ |
|
|
<div class="log_three_list_top_left">
|
|
|
<if condition="$vo.is_courier eq 1">
|
|
|
<div class="log_three_list_top_lo">
|
|
|
<img src="__TMPL__/public/assets/images/fangkuang.png" alt=""/>
|
|
|
<img src="__TMPL__/public/assets/images/fangkuang.png"
|
|
|
data-indent-id="{$vo['id']}" alt=""/>
|
|
|
</div>
|
|
|
</if>
|
|
|
<div class="log_three_list_top_lt">
|
...
|
...
|
@@ -306,20 +346,22 @@ |
|
|
</if>
|
|
|
</div>
|
|
|
</div>
|
|
|
<foreach name="$vo.indent_goods" item="i_g">
|
|
|
<div class="log_three_list_center">
|
|
|
<div class="log_three_list_center_left">
|
|
|
<img src="{:cmf_get_image_url($i_g.thumbnail)}" alt=""/>
|
|
|
</div>
|
|
|
<div class="log_three_list_center_right">
|
|
|
<div class="log_three_center_one">
|
|
|
{$i_g.book_name}
|
|
|
<a href="{:url('get_one',array('id'=>$vo['id']))}">
|
|
|
<foreach name="$vo.indent_goods" item="i_g">
|
|
|
<div class="log_three_list_center">
|
|
|
<div class="log_three_list_center_left">
|
|
|
<img src="{:cmf_get_image_url($i_g.thumbnail)}" alt=""/>
|
|
|
</div>
|
|
|
<div class="log_three_list_center_right">
|
|
|
<div class="log_three_center_one">
|
|
|
{$i_g.book_name}
|
|
|
</div>
|
|
|
<div class="log_three_center_two">×{$i_g.number}</div>
|
|
|
<div class="log_three_center_three"><span>¥</span>{$i_g.price*$i_g.number}</div>
|
|
|
</div>
|
|
|
<div class="log_three_center_two">×{$i_g.number}</div>
|
|
|
<div class="log_three_center_three"><span>¥</span>{$i_g.price*$i_g.number}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</foreach>
|
|
|
</foreach>
|
|
|
</a>
|
|
|
<!-- 立即发货 -->
|
|
|
<div class="log_three_bottom_btn">
|
|
|
<if condition="$vo.state eq 2">
|
...
|
...
|
@@ -341,10 +383,10 @@ |
|
|
</if>
|
|
|
</div>
|
|
|
</div>
|
|
|
</a>
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</div>
|
|
|
|
|
|
<!--已完成-->
|
|
|
<div class="log_three_list_contant">
|
|
|
<foreach name="$data" item="vo">
|
...
|
...
|
@@ -354,7 +396,8 @@ |
|
|
<div class="log_three_list_top_left">
|
|
|
<if condition="$vo.is_courier eq 1">
|
|
|
<div class="log_three_list_top_lo">
|
|
|
<img src="__TMPL__/public/assets/images/fangkuang.png" alt=""/>
|
|
|
<img src="__TMPL__/public/assets/images/fangkuang.png"
|
|
|
data-indent-id="{$vo['id']}" alt=""/>
|
|
|
</div>
|
|
|
</if>
|
|
|
<div class="log_three_list_top_lt">
|
...
|
...
|
@@ -376,20 +419,22 @@ |
|
|
</if>
|
|
|
</div>
|
|
|
</div>
|
|
|
<foreach name="$vo.indent_goods" item="i_g">
|
|
|
<div class="log_three_list_center">
|
|
|
<div class="log_three_list_center_left">
|
|
|
<img src="{:cmf_get_image_url($i_g.thumbnail)}" alt=""/>
|
|
|
</div>
|
|
|
<div class="log_three_list_center_right">
|
|
|
<div class="log_three_center_one">
|
|
|
{$i_g.book_name}
|
|
|
<a href="{:url('get_one',array('id'=>$vo['id']))}">
|
|
|
<foreach name="$vo.indent_goods" item="i_g">
|
|
|
<div class="log_three_list_center">
|
|
|
<div class="log_three_list_center_left">
|
|
|
<img src="{:cmf_get_image_url($i_g.thumbnail)}" alt=""/>
|
|
|
</div>
|
|
|
<div class="log_three_list_center_right">
|
|
|
<div class="log_three_center_one">
|
|
|
{$i_g.book_name}
|
|
|
</div>
|
|
|
<div class="log_three_center_two">×{$i_g.number}</div>
|
|
|
<div class="log_three_center_three"><span>¥</span>{$i_g.price*$i_g.number}</div>
|
|
|
</div>
|
|
|
<div class="log_three_center_two">×{$i_g.number}</div>
|
|
|
<div class="log_three_center_three"><span>¥</span>{$i_g.price*$i_g.number}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</foreach>
|
|
|
</foreach>
|
|
|
</a>
|
|
|
<!-- 立即发货 -->
|
|
|
<div class="log_three_bottom_btn">
|
|
|
<if condition="$vo.state eq 2">
|
...
|
...
|
@@ -425,7 +470,7 @@ |
|
|
全选
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="log_three_fixed_right">
|
|
|
<div class="log_three_fixed_right unify_all">
|
|
|
统一发货
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -452,7 +497,7 @@ |
|
|
$(this).addClass("three_model_school_hover").addClass("word_color").addClass('aaa').siblings().removeClass("three_model_school_hover").removeClass("word_color").removeClass("aaa");
|
|
|
});
|
|
|
|
|
|
$("body").on('click','.log_three_list_top_lo',function () {
|
|
|
$("body").on('click', '.log_three_list_top_lo', function () {
|
|
|
console.log($(this).find("img").attr("src"));
|
|
|
if ($(this).find("img").attr("src") == "__TMPL__/public/assets/images/fangkuang.png") {
|
|
|
$(this).find("img").attr("src", "__TMPL__/public/assets/images/xuanzhong (1).png");
|
...
|
...
|
@@ -489,12 +534,12 @@ |
|
|
});
|
|
|
|
|
|
//统一配送
|
|
|
$(".log_three_select_tongyi").click(function(){
|
|
|
$(".log_three_select_tongyi").click(function () {
|
|
|
$(".tx_mask_tongyi").css({
|
|
|
display: "block"
|
|
|
});
|
|
|
})
|
|
|
$(".tx_mask_tongyi .three_model_school_name").click(function(){
|
|
|
$(".tx_mask_tongyi .three_model_school_name").click(function () {
|
|
|
var index = $(this).index();
|
|
|
$(this).addClass('there_unActive').siblings().removeClass('there_unActive');
|
|
|
$('.log_three_select_contant').text($(this).text()).css("color", "#333");
|
...
|
...
|
@@ -503,13 +548,13 @@ |
|
|
$("#is_courier").val($(this).attr('data-id'))
|
|
|
})
|
|
|
//选择快递方式
|
|
|
$(".log_psong_select").click(function() {
|
|
|
$(".log_psong_select").click(function () {
|
|
|
console.log(213)
|
|
|
$(".tx_mask_kuaidi").css({
|
|
|
display: "block"
|
|
|
});
|
|
|
});
|
|
|
$(".tx_mask_kuaidi .three_model_school_name").click(function() {
|
|
|
$(".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");
|
...
|
...
|
@@ -517,7 +562,7 @@ |
|
|
$('#logistic_name').val($(this).attr('data-name'))
|
|
|
});
|
|
|
var index = $(".log_three_bottom").index();
|
|
|
$("body").on('click','.log_three_bottom',function () {
|
|
|
$("body").on('click', '.log_three_bottom', function () {
|
|
|
console.log(index);
|
|
|
$(".tx_maskone").css({
|
|
|
display: "block"
|
...
|
...
|
@@ -566,7 +611,8 @@ |
|
|
$('.tx_mask_school').hide()
|
|
|
}
|
|
|
});
|
|
|
function search(){
|
|
|
|
|
|
function search() {
|
|
|
var school = $('#school').val();
|
|
|
var grade = $('#grade').val();
|
|
|
var state = $('.log_three_tab_top .aaa').attr('data-state');
|
...
|
...
|
@@ -577,120 +623,121 @@ |
|
|
// } else if (grade == '') {
|
|
|
// alert('请选择班级')
|
|
|
// } else {
|
|
|
console.log(school);
|
|
|
console.log(grade);
|
|
|
$.ajax({
|
|
|
'url': "{:url('order_salesman/getOrderSalesman')}",
|
|
|
'type': "GET",
|
|
|
'data': {'school': school, 'grade': grade, 'state': state, 'is_courier':is_courier},
|
|
|
'success': (function (data) {
|
|
|
var index = $('.log_three_tab_top div').index($('.aaa'));
|
|
|
if (data.code == 1) {
|
|
|
var result = data.data;
|
|
|
console.log(result)
|
|
|
var html = '';
|
|
|
for (var i = 0; i < result.length; i++) {
|
|
|
if (result[i]['state'] == 2) {
|
|
|
var state = '待发货';
|
|
|
if (result[i]['is_courier'] == 1) {
|
|
|
var html_bottom = "<div class=\"log_three_bottom_btn\"><div class=\"log_three_bottom send\" data-indent-id=\"" + result[i].id + "\" data-is_courier=\"" + result[i].is_courier + "\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t立即发货\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t</div></div>";
|
|
|
} else {
|
|
|
var html_bottom = "<div class=\"log_three_bottom_btn\"><div class=\"log_three_bottom send\" data-indent-id=\"" + result[i].id + "\" data-is_courier=\"" + result[i].is_courier + "\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t立即发货\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t</div></div>";
|
|
|
}
|
|
|
} else if (result[i]['state'] == 5) {
|
|
|
var state = '已发货';
|
|
|
if(result[i]['is_courier'] == 2){
|
|
|
var html_bottom = "<a href=\"{:url('logistics/index','',false,true)}/indent_id/"+result[i].id+"\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_bottom_btn\"><div class=\"log_three_bottom\" data-indent-id=\"" + result[i].id + "\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t\t\t查看物流\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t\t</div></div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t</a>";
|
|
|
}else{
|
|
|
var html_bottom = "";
|
|
|
}
|
|
|
console.log(school);
|
|
|
console.log(grade);
|
|
|
$.ajax({
|
|
|
'url': "{:url('order_salesman/getOrderSalesman')}",
|
|
|
'type': "GET",
|
|
|
'data': {'school': school, 'grade': grade, 'state': state, 'is_courier': is_courier},
|
|
|
'success': (function (data) {
|
|
|
var index = $('.log_three_tab_top div').index($('.aaa'));
|
|
|
if (data.code == 1) {
|
|
|
var result = data.data;
|
|
|
console.log(result)
|
|
|
var html = '';
|
|
|
for (var i = 0; i < result.length; i++) {
|
|
|
if (result[i]['state'] == 2) {
|
|
|
var state = '待发货';
|
|
|
if (result[i]['is_courier'] == 1) {
|
|
|
var html_bottom = "<div class=\"log_three_bottom_btn\"><div class=\"log_three_bottom send\" data-indent-id=\"" + result[i].id + "\" data-is_courier=\"" + result[i].is_courier + "\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t立即发货\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t</div></div>";
|
|
|
} else {
|
|
|
var state = '已完成';
|
|
|
var html_bottom = "<div class=\"log_three_bottom\" data-indent-id=\"\"+result[i].id+\"\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t已完成啦\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t</div>";
|
|
|
var html_bottom = "<div class=\"log_three_bottom_btn\"><div class=\"log_three_bottom send\" data-indent-id=\"" + result[i].id + "\" data-is_courier=\"" + result[i].is_courier + "\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t立即发货\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t</div></div>";
|
|
|
}
|
|
|
var indent_goods_data = result[i].indent_goods;
|
|
|
var indent_goods_html = '';
|
|
|
for(var i3=0;i3<indent_goods_data.length;i3++){
|
|
|
indent_goods_html += "<div class=\"log_three_list_center\">\n" +
|
|
|
" <div class=\"log_three_list_center_left\">\n" +
|
|
|
" <img src=\"{:cmf_get_image_url('')}"+indent_goods_data[i3].thumbnail+"\" alt=\"\"/>\n" +
|
|
|
" </div>\n" +
|
|
|
" <div class=\"log_three_list_center_right\">\n" +
|
|
|
" <div class=\"log_three_center_one\">\n" +
|
|
|
" "+indent_goods_data[i3].book_name+"\n" +
|
|
|
" </div>\n" +
|
|
|
" <div class=\"log_three_center_two\">×"+indent_goods_data[i3].number+"</div>\n" +
|
|
|
" <div class=\"log_three_center_three\"><span>¥</span>"+indent_goods_data[i3].price*indent_goods_data[i3].number+"</div>\n" +
|
|
|
" </div>\n" +
|
|
|
" </div>";
|
|
|
}
|
|
|
if(is_courier == 1){
|
|
|
html += "<div class=\"log_three_list order_"+result[i].id+"\">\n" +
|
|
|
"\t\t\t\t\t\t\t<div class=\"log_three_list_top\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_left\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_lo\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t<img src=\"__TMPL__/public/assets/images/fangkuang.png\" alt=\"\" />\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_lt\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_zhongbiao\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t\t<img src=\"__TMPL__/public/assets/images/52.png\" alt=\"\" />\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_shijian\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t\t" + result[i].pay_time + "\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_right\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t" + state + "\n" +
|
|
|
"\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t</div>\n" +indent_goods_html+
|
|
|
"\t\t\t\t\t\t"+html_bottom+"</div>";
|
|
|
}else if(is_courier == 2){
|
|
|
html += "<div class=\"log_three_list order_"+result[i].id+"\">\n" +
|
|
|
"\t\t\t\t\t\t\t<div class=\"log_three_list_top\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_left\">\n" +
|
|
|
// "\t\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_lo\">\n" +
|
|
|
// "\t\t\t\t\t\t\t\t\t\t<img src=\"__TMPL__/public/assets/images/fangkuang.png\" alt=\"\" />\n" +
|
|
|
// "\t\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_lt\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_zhongbiao\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t\t<img src=\"__TMPL__/public/assets/images/52.png\" alt=\"\" />\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_shijian\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t\t" + result[i].pay_time + "\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_right\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t" + state + "\n" +
|
|
|
"\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t</div>\n" +indent_goods_html+
|
|
|
"\t\t\t\t\t\t"+html_bottom+"</div>";
|
|
|
} else if (result[i]['state'] == 5) {
|
|
|
var state = '已发货';
|
|
|
if (result[i]['is_courier'] == 2) {
|
|
|
var html_bottom = "<a href=\"{:url('logistics/index','',false,true)}/indent_id/" + result[i].id + "\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_bottom_btn\"><div class=\"log_three_bottom\" data-indent-id=\"" + result[i].id + "\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t\t\t查看物流\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t\t</div></div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t</a>";
|
|
|
} else {
|
|
|
var html_bottom = "";
|
|
|
}
|
|
|
} else {
|
|
|
var state = '已完成';
|
|
|
var html_bottom = "<div class=\"log_three_bottom\" data-indent-id=\"\"+result[i].id+\"\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t已完成啦\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t</div>";
|
|
|
}
|
|
|
var indent_goods_data = result[i].indent_goods;
|
|
|
var indent_goods_html = '';
|
|
|
for (var i3 = 0; i3 < indent_goods_data.length; i3++) {
|
|
|
indent_goods_html += "<div class=\"log_three_list_center\">\n" +
|
|
|
" <div class=\"log_three_list_center_left\">\n" +
|
|
|
" <img src=\"{:cmf_get_image_url('')}" + indent_goods_data[i3].thumbnail + "\" alt=\"\"/>\n" +
|
|
|
" </div>\n" +
|
|
|
" <div class=\"log_three_list_center_right\">\n" +
|
|
|
" <div class=\"log_three_center_one\">\n" +
|
|
|
" " + indent_goods_data[i3].book_name + "\n" +
|
|
|
" </div>\n" +
|
|
|
" <div class=\"log_three_center_two\">×" + indent_goods_data[i3].number + "</div>\n" +
|
|
|
" <div class=\"log_three_center_three\"><span>¥</span>" + indent_goods_data[i3].price * indent_goods_data[i3].number + "</div>\n" +
|
|
|
" </div>\n" +
|
|
|
" </div>";
|
|
|
}
|
|
|
if (is_courier == 1) {
|
|
|
html += "<div class=\"log_three_list order_" + result[i].id + "\">\n" +
|
|
|
"\t\t\t\t\t\t\t<div class=\"log_three_list_top\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_left\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_lo\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t<img src=\"__TMPL__/public/assets/images/fangkuang.png\" alt=\"\" />\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_lt\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_zhongbiao\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t\t<img src=\"__TMPL__/public/assets/images/52.png\" alt=\"\" />\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_shijian\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t\t" + result[i].pay_time + "\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_right\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t" + state + "\n" +
|
|
|
"\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t</div><a href=\"{:url('get_one','',false,true)}/id/"+result[i].id+"\">\n" + indent_goods_html +"</a>"+
|
|
|
"\t\t\t\t\t\t" + html_bottom + "</div>";
|
|
|
} else if (is_courier == 2) {
|
|
|
html += "<div class=\"log_three_list order_" + result[i].id + "\">\n" +
|
|
|
"\t\t\t\t\t\t\t<div class=\"log_three_list_top\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_left\">\n" +
|
|
|
// "\t\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_lo\">\n" +
|
|
|
// "\t\t\t\t\t\t\t\t\t\t<img src=\"__TMPL__/public/assets/images/fangkuang.png\" alt=\"\" />\n" +
|
|
|
// "\t\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_lt\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_zhongbiao\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t\t<img src=\"__TMPL__/public/assets/images/52.png\" alt=\"\" />\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_shijian\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t\t" + result[i].pay_time + "\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_right\">\n" +
|
|
|
"\t\t\t\t\t\t\t\t\t\t" + state + "\n" +
|
|
|
"\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
"\t\t\t\t\t\t\t</div><a href=\"{:url('get_one','',false,true)}/id/"+result[i].id+"\">\n" + indent_goods_html +"</a>"+
|
|
|
"\t\t\t\t\t\t" + html_bottom + "</div>";
|
|
|
}
|
|
|
|
|
|
$('.log_three_list_contant').eq(index).html(html);
|
|
|
update();
|
|
|
} else {
|
|
|
alert('未知错误');
|
|
|
}
|
|
|
}),
|
|
|
'error': (function () {
|
|
|
alert('与服务器断开连接');
|
|
|
})
|
|
|
|
|
|
$('.log_three_list_contant').eq(index).html(html);
|
|
|
update();
|
|
|
} else {
|
|
|
alert('未知错误');
|
|
|
}
|
|
|
}),
|
|
|
'error': (function () {
|
|
|
alert('与服务器断开连接');
|
|
|
})
|
|
|
})
|
|
|
// }
|
|
|
}
|
|
|
|
|
|
$(function () {
|
|
|
$('.school').click(function () {
|
|
|
var school_id = $(this).attr('data-id');
|
...
|
...
|
@@ -723,58 +770,65 @@ |
|
|
search()
|
|
|
});
|
|
|
//发货
|
|
|
$("body").on('click','.send',function(){
|
|
|
$("body").on('click', '.send', function () {
|
|
|
var indent_id = $(this).attr('data-indent-id');
|
|
|
var is_courier = $(this).attr('data-is_courier');
|
|
|
if(is_courier == 1){
|
|
|
if (is_courier == 1) {
|
|
|
//统一配送
|
|
|
$('.time').show();
|
|
|
$('.logistic').hide();
|
|
|
}else if(is_courier == 2){
|
|
|
} else if (is_courier == 2) {
|
|
|
//快递
|
|
|
$('.time').hide();
|
|
|
$('.logistic').show();
|
|
|
}
|
|
|
$('.confirm').attr('data-is_courier',is_courier);
|
|
|
$('.confirm').attr('data-indent-id',indent_id);
|
|
|
$('.confirm').attr('data-is_courier',is_courier);
|
|
|
$('.confirm').attr('data-is_courier', is_courier);
|
|
|
$('.confirm').attr('data-indent-id', indent_id);
|
|
|
$('.confirm').attr('data-is_courier', is_courier);
|
|
|
})
|
|
|
//点击确认
|
|
|
$("body").on('click','.confirm',function(){
|
|
|
$("body").on('click', '.confirm', function () {
|
|
|
var is_courier = $(this).attr('data-is_courier');
|
|
|
var start_time = $('#start_time').val();
|
|
|
var end_time = $('#end_time').val();
|
|
|
var logistic_name = $('#logistic_name').val();
|
|
|
var logistic_code = $('#logistic_code').val();
|
|
|
var indent_id = $(this).attr('data-indent-id');
|
|
|
if(is_courier == 1){
|
|
|
if(start_time == ''){
|
|
|
alert('请填写配送时间')
|
|
|
if (is_courier == 1) {
|
|
|
if (start_time == '') {
|
|
|
alert('请填写配送时间');
|
|
|
return false;
|
|
|
}else if(end_time == ''){
|
|
|
alert('请填写配送时间')
|
|
|
} else if (end_time == '') {
|
|
|
alert('请填写配送时间');
|
|
|
return false;
|
|
|
}
|
|
|
}else if(is_courier == 2){
|
|
|
if(logistic_name == ''){
|
|
|
alert('请填写快递公司')
|
|
|
} else if (is_courier == 2) {
|
|
|
if (logistic_name == '') {
|
|
|
alert('请填写快递公司');
|
|
|
return false;
|
|
|
}else if(logistic_code == ''){
|
|
|
alert('请填写快递单号')
|
|
|
} else if (logistic_code == '') {
|
|
|
alert('请填写快递单号');
|
|
|
return false;
|
|
|
}
|
|
|
}else if(is_courier == ''){
|
|
|
alert('未知错误')
|
|
|
} else if (is_courier == '') {
|
|
|
alert('未知错误');
|
|
|
return false;
|
|
|
}
|
|
|
$.ajax({
|
|
|
url:"{:url('order_salesman/send')}",
|
|
|
type:"GET",
|
|
|
data:{'start_time':start_time,'end_time':end_time,'logistic_name':logistic_name,'logistic_code':logistic_code,'is_courier':is_courier,'indent_id':indent_id},
|
|
|
success:function(res){
|
|
|
url: "{:url('order_salesman/send')}",
|
|
|
type: "GET",
|
|
|
data: {
|
|
|
'start_time': start_time,
|
|
|
'end_time': end_time,
|
|
|
'logistic_name': logistic_name,
|
|
|
'logistic_code': logistic_code,
|
|
|
'is_courier': is_courier,
|
|
|
'indent_id': indent_id
|
|
|
},
|
|
|
success: function (res) {
|
|
|
console.log(res);
|
|
|
if(res.code == 1){
|
|
|
$('.order_'+indent_id).remove();
|
|
|
if (res.code == 1) {
|
|
|
$('.order_' + indent_id).remove();
|
|
|
$(".tx_maskone").css({
|
|
|
display: "none"
|
|
|
});
|
...
|
...
|
@@ -784,21 +838,62 @@ |
|
|
}
|
|
|
alert(res.msg)
|
|
|
},
|
|
|
error:function(res){
|
|
|
error: function (res) {
|
|
|
alert('与服务器断开连接')
|
|
|
}
|
|
|
})
|
|
|
});
|
|
|
|
|
|
$('body').on('click', '.unify_all', function () {
|
|
|
var length = $('.log_three_list_top_lo img').length - 1;
|
|
|
var arr = [];
|
|
|
for (var i = 0; i <= length; i++) {
|
|
|
if ($('.log_three_list_top_lo img').attr('src') == "__TMPL__/public/assets/images/xuanzhong (1).png") {
|
|
|
arr.push($('.log_three_list_top_lo img').eq(i).attr('data-indent-id'));
|
|
|
}
|
|
|
}
|
|
|
$('.confirm2').attr('data-indent-id', arr.join(","));
|
|
|
if (arr.length != 0) {
|
|
|
$('.tx_masktwo').show();
|
|
|
} else {
|
|
|
alert('请至少选择一个订单');
|
|
|
}
|
|
|
});
|
|
|
$('.confirm2').click(function () {
|
|
|
var start_time2 = $('#start_time2').val();
|
|
|
var end_time2 = $('#end_time2').val();
|
|
|
var indent_ids = $(this).attr('data-indent-id');
|
|
|
if (indent_ids == '') {
|
|
|
alert('请至少选择一个订单');
|
|
|
} else if (start_time2 == '') {
|
|
|
alert('请选择配送时间')
|
|
|
} else if (end_time2 == '') {
|
|
|
alert('请选择配送时间')
|
|
|
} else {
|
|
|
$.ajax({
|
|
|
url: "{:url('order_salesman/send_all')}",
|
|
|
type: "GET",
|
|
|
data: {'start_time2': start_time2, 'end_time2': end_time2, 'indent_ids': indent_ids},
|
|
|
success: function (res) {
|
|
|
if (res.code == 1) {
|
|
|
alert('发货成功')
|
|
|
} else {
|
|
|
alert(res.msg);
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
});
|
|
|
update();
|
|
|
|
|
|
})
|
|
|
function update(){
|
|
|
|
|
|
function update() {
|
|
|
var is_courier = $('#is_courier').val();
|
|
|
var index = $('.log_three_tab_top div').index($('.aaa'));
|
|
|
console.log(is_courier);
|
|
|
if(is_courier == 1){
|
|
|
if (is_courier == 1 && index == 0) {
|
|
|
$('.log_three_list_fixed').show();
|
|
|
}else if(is_courier == 2){
|
|
|
} else if (is_courier == 2 || index != 0) {
|
|
|
$('.log_three_list_fixed').hide();
|
|
|
}
|
|
|
}
|
...
|
...
|
|