作者 anyv
1 个管道 的构建 通过 耗费 3 秒

Merge branch 'master' of http://114.215.101.231:8099/anyv/xkeasy

@@ -129,9 +129,9 @@ class OrderSalesmanController extends WeChatBaseController @@ -129,9 +129,9 @@ class OrderSalesmanController extends WeChatBaseController
129 if(empty($param['start_time'])){ 129 if(empty($param['start_time'])){
130 $this->error('缺少必要参数2'); 130 $this->error('缺少必要参数2');
131 } 131 }
132 - if(empty($param['end_time'])){  
133 - $this->error('缺少必要参数3');  
134 - } 132 +// if(empty($param['end_time'])){
  133 +// $this->error('缺少必要参数3');
  134 +// }
135 }else if($param['is_courier'] == 2){ 135 }else if($param['is_courier'] == 2){
136 if(empty($param['logistic_name'])){ 136 if(empty($param['logistic_name'])){
137 $this->error('缺少必要参数4'); 137 $this->error('缺少必要参数4');
@@ -155,7 +155,7 @@ class OrderSalesmanController extends WeChatBaseController @@ -155,7 +155,7 @@ class OrderSalesmanController extends WeChatBaseController
155 $arr = []; 155 $arr = [];
156 if($param['is_courier'] == 1){ 156 if($param['is_courier'] == 1){
157 $arr['start_time'] = $param['start_time']; 157 $arr['start_time'] = $param['start_time'];
158 - $arr['end_time'] = $param['end_time']; 158 +// $arr['end_time'] = $param['end_time'];
159 }else if($param['is_courier'] == 2){ 159 }else if($param['is_courier'] == 2){
160 $arr['logistic_name'] = $param['logistic_name']; 160 $arr['logistic_name'] = $param['logistic_name'];
161 $arr['logistic_code'] = $param['logistic_code']; 161 $arr['logistic_code'] = $param['logistic_code'];
@@ -278,16 +278,17 @@ @@ -278,16 +278,17 @@
278 <div class="log_three_model"> 278 <div class="log_three_model">
279 <div class="log_three_model_one time"> 279 <div class="log_three_model_one time">
280 <div class="log_three_model_left">配送时间</div> 280 <div class="log_three_model_left">配送时间</div>
281 - <div class="log_psong">  
282 - <input type="text" id="start_time" value="" placeholder="请输入开始配送时间"/> 281 + <div class="log_psong tongyi_start_time" style="color: #CCCCCC;">
  282 + 请选择配送到达时间
283 </div> 283 </div>
  284 + <input type="hidden" id="start_time" value="" placeholder="请输入开配送时间"/>
284 </div> 285 </div>
285 - <div class="log_three_model_one time"> 286 + <!--<div class="log_three_model_one time">
286 <div class="log_three_model_left">配送时间</div> 287 <div class="log_three_model_left">配送时间</div>
287 <div class="log_psong"> 288 <div class="log_psong">
288 <input type="text" id="end_time" value="" placeholder="请输入结束配送时间"/> 289 <input type="text" id="end_time" value="" placeholder="请输入结束配送时间"/>
289 </div> 290 </div>
290 - </div> 291 + </div>-->
291 <div class="log_three_model_one logistic"> 292 <div class="log_three_model_one logistic">
292 <div class="log_three_model_left">选择快递</div> 293 <div class="log_three_model_left">选择快递</div>
293 <div class="log_psong log_psong_select"> 294 <div class="log_psong log_psong_select">
@@ -1081,10 +1082,10 @@ @@ -1081,10 +1082,10 @@
1081 $('.confirm').attr('data-is_courier', is_courier); 1082 $('.confirm').attr('data-is_courier', is_courier);
1082 }); 1083 });
1083 //点击确认 1084 //点击确认
1084 - $("body").on('click', '.confirm', function () { 1085 + $('.confirm').click(function () {
1085 var is_courier = $(this).attr('data-is_courier'); 1086 var is_courier = $(this).attr('data-is_courier');
1086 var start_time = $('#start_time').val(); 1087 var start_time = $('#start_time').val();
1087 - var end_time = $('#end_time').val(); 1088 + // var end_time = $('#end_time').val();
1088 var logistic_name = $('#logistic_name').val(); 1089 var logistic_name = $('#logistic_name').val();
1089 var logistic_code = $('#logistic_code').val(); 1090 var logistic_code = $('#logistic_code').val();
1090 var indent_id = $(this).attr('data-indent-id'); 1091 var indent_id = $(this).attr('data-indent-id');
@@ -1092,10 +1093,11 @@ @@ -1092,10 +1093,11 @@
1092 if (start_time == '') { 1093 if (start_time == '') {
1093 alert('请填写配送时间'); 1094 alert('请填写配送时间');
1094 return false; 1095 return false;
1095 - } else if (end_time == '') {  
1096 - alert('请填写配送时间');  
1097 - return false;  
1098 } 1096 }
  1097 + // else if (end_time == '') {
  1098 + // alert('请填写配送时间');
  1099 + // return false;
  1100 + // }
1099 } else if (is_courier == 2) { 1101 } else if (is_courier == 2) {
1100 if (logistic_name == '') { 1102 if (logistic_name == '') {
1101 alert('请填写快递公司'); 1103 alert('请填写快递公司');
@@ -1113,7 +1115,7 @@ @@ -1113,7 +1115,7 @@
1113 type: "GET", 1115 type: "GET",
1114 data: { 1116 data: {
1115 'start_time': start_time, 1117 'start_time': start_time,
1116 - 'end_time': end_time, 1118 + // 'end_time': end_time,
1117 'logistic_name': logistic_name, 1119 'logistic_name': logistic_name,
1118 'logistic_code': logistic_code, 1120 'logistic_code': logistic_code,
1119 'is_courier': is_courier, 1121 'is_courier': is_courier,
@@ -1231,6 +1233,25 @@ @@ -1231,6 +1233,25 @@
1231 } 1233 }
1232 } 1234 }
1233 </script> 1235 </script>
  1236 +<script type="text/javascript">
  1237 + var dtpicker = new mui.DtPicker({
  1238 + type: "datetime", //设置日历初始视图模式
  1239 + beginDate: new Date(), //设置开始日期
  1240 + labels: ['年', '月', '日', '时', '分', '秒'], //设置默认标签区域提示语
  1241 + })
  1242 + //统一配送选择时间
  1243 + $(".tongyi_start_time").click(function() {
  1244 + dtpicker.show(function(e) {
  1245 + console.log(e);
  1246 + $('.tongyi_start_time').text(e.text);
  1247 + $('#start_time').val(e.text);
  1248 + $('.tongyi_start_time').css('color', '#333333');
  1249 + });
  1250 + });
  1251 + function zZFun(e) {
  1252 + window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
  1253 + }
  1254 +</script>
1234 </body> 1255 </body>
1235 1256
1236 </html> 1257 </html>
@@ -60,16 +60,17 @@ @@ -60,16 +60,17 @@
60 <div class="log_three_model"> 60 <div class="log_three_model">
61 <div class="log_three_model_one time"> 61 <div class="log_three_model_one time">
62 <div class="log_three_model_left">配送时间</div> 62 <div class="log_three_model_left">配送时间</div>
63 - <div class="log_psong">  
64 - <input type="text" id="start_time" value="" placeholder="请输入开始配送时间"/> 63 + <div class="log_psong tongyi_start_time" style="color: #CCCCCC;">
  64 + 请选择配送到达时间
65 </div> 65 </div>
  66 + <input type="hidden" id="start_time" value="" placeholder="请输入开配送时间"/>
66 </div> 67 </div>
67 - <div class="log_three_model_one time"> 68 + <!--<div class="log_three_model_one time">
68 <div class="log_three_model_left">配送时间</div> 69 <div class="log_three_model_left">配送时间</div>
69 <div class="log_psong"> 70 <div class="log_psong">
70 <input type="text" id="end_time" value="" placeholder="请输入结束配送时间"/> 71 <input type="text" id="end_time" value="" placeholder="请输入结束配送时间"/>
71 </div> 72 </div>
72 - </div> 73 + </div>-->
73 <div class="log_three_model_one logistic"> 74 <div class="log_three_model_one logistic">
74 <div class="log_three_model_left">选择快递</div> 75 <div class="log_three_model_left">选择快递</div>
75 <div class="log_psong log_psong_select"> 76 <div class="log_psong log_psong_select">
@@ -168,7 +169,7 @@ @@ -168,7 +169,7 @@
168 <img src="__TMPL__/public/assets/images/29.png" alt=""/> 169 <img src="__TMPL__/public/assets/images/29.png" alt=""/>
169 </div> 170 </div>
170 </div> 171 </div>
171 - <else /> 172 + <else/>
172 <div class="log_four_input_one"> 173 <div class="log_four_input_one">
173 <div class="log_four_input_one_left"> 174 <div class="log_four_input_one_left">
174 地区 175 地区
@@ -268,7 +269,7 @@ @@ -268,7 +269,7 @@
268 <!-- 底部按钮 --> 269 <!-- 底部按钮 -->
269 <div class="log_seven_btn log_seven_btn9" style="margin-top: 0.36rem;"> 270 <div class="log_seven_btn log_seven_btn9" style="margin-top: 0.36rem;">
270 <if condition="$data.state eq 2"> 271 <if condition="$data.state eq 2">
271 - <div class="log_seven_btn_contant send" data-is_courier="{$data.is_courier}" data-indent-id="{$data.id}" > 272 + <div class="log_seven_btn_contant send" data-is_courier="{$data.is_courier}" data-indent-id="{$data.id}">
272 立即发货 273 立即发货
273 </div> 274 </div>
274 <elseif condition="$data.state eq 5"/> 275 <elseif condition="$data.state eq 5"/>
@@ -288,92 +289,122 @@ @@ -288,92 +289,122 @@
288 function zZFun(e) { 289 function zZFun(e) {
289 window.event ? (window.event.cancelBubble = true) : e.stopPropagation(); 290 window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
290 } 291 }
291 -//选择快递方式  
292 -$(".log_psong_select").click(function () {  
293 - $(".tx_mask_kuaidi").css({  
294 - display: "block" 292 +
  293 + //选择快递方式
  294 + $(".log_psong_select").click(function () {
  295 + $(".tx_mask_kuaidi").css({
  296 + display: "block"
  297 + });
295 }); 298 });
296 -});  
297 -$(".tx_mask_kuaidi .three_model_school_name").click(function () {  
298 - var index = $(this).index();  
299 - $(this).addClass('there_unActive').siblings().removeClass('there_unActive');  
300 - $('.log_ps_title').text($(this).text()).css("color", "#333");  
301 - $(".tx_mask_kuaidi").hide();  
302 - $('#logistic_name').val($(this).attr('data-name'))  
303 -});  
304 -$(function(){  
305 - $('body').on('click','.send',function(){  
306 - var indent_id = $(this).attr('data-indent-id');  
307 - var is_courier = $(this).attr('data-is_courier');  
308 - console.log(indent_id);  
309 - console.log(is_courier);  
310 - if (is_courier == 1) {  
311 - //统一配送  
312 - $('.time').show();  
313 - $('.logistic').hide();  
314 - } else if (is_courier == 2) {  
315 - //快递  
316 - $('.time').hide();  
317 - $('.logistic').show();  
318 - }  
319 - $('.tx_maskone').show();  
320 - $('.confirm').attr('data-indent-id',indent_id);  
321 - $('.confirm').attr('data-is_courier',is_courier); 299 + $(".tx_mask_kuaidi .three_model_school_name").click(function () {
  300 + var index = $(this).index();
  301 + $(this).addClass('there_unActive').siblings().removeClass('there_unActive');
  302 + $('.log_ps_title').text($(this).text()).css("color", "#333");
  303 + $(".tx_mask_kuaidi").hide();
  304 + $('#logistic_name').val($(this).attr('data-name'))
322 }); 305 });
323 - $('body').on('click','.confirm',function(){  
324 - var is_courier = $(this).attr('data-is_courier');  
325 - var indent_id = $(this).attr('data-indent-id');  
326 - var logistic_name = $('#logistic_name').val();  
327 - var logistic_code = $('#logistic_code').val();  
328 - var start_time = $('#start_time').val();  
329 - var end_time = $('#end_time').val();  
330 - if (is_courier == 1) {  
331 - if (start_time == '') {  
332 - alert('请填写配送时间');  
333 - return false;  
334 - } else if (end_time == '') {  
335 - alert('请填写配送时间');  
336 - return false; 306 + $(function () {
  307 + $('body').on('click', '.send', function () {
  308 + var indent_id = $(this).attr('data-indent-id');
  309 + var is_courier = $(this).attr('data-is_courier');
  310 + console.log(indent_id);
  311 + console.log(is_courier);
  312 + if (is_courier == 1) {
  313 + //统一配送
  314 + $('.time').show();
  315 + $('.logistic').hide();
  316 + } else if (is_courier == 2) {
  317 + //快递
  318 + $('.time').hide();
  319 + $('.logistic').show();
337 } 320 }
338 - } else if (is_courier == 2) {  
339 - if (logistic_name == '') {  
340 - alert('请填写快递公司');  
341 - return false;  
342 - } else if (logistic_code == '') {  
343 - alert('请填写快递单号'); 321 + $('.tx_maskone').show();
  322 + $('.confirm').attr('data-indent-id', indent_id);
  323 + $('.confirm').attr('data-is_courier', is_courier);
  324 + });
  325 + $('.confirm').click(function () {
  326 + var is_courier = $(this).attr('data-is_courier');
  327 + var indent_id = $(this).attr('data-indent-id');
  328 + var logistic_name = $('#logistic_name').val();
  329 + var logistic_code = $('#logistic_code').val();
  330 + var start_time = $('#start_time').val();
  331 + // var end_time = $('#end_time').val();
  332 + if (is_courier == 1) {
  333 + if (start_time == '') {
  334 + alert('请填写配送时间');
  335 + return false;
  336 + }
  337 + // else if (end_time == '') {
  338 + // alert('请填写配送时间');
  339 + // return false;
  340 + // }
  341 + } else if (is_courier == 2) {
  342 + if (logistic_name == '') {
  343 + alert('请填写快递公司');
  344 + return false;
  345 + } else if (logistic_code == '') {
  346 + alert('请填写快递单号');
  347 + return false;
  348 + }
  349 + } else if (is_courier == '') {
  350 + alert('未知错误');
344 return false; 351 return false;
345 } 352 }
346 - } else if (is_courier == '') {  
347 - alert('未知错误');  
348 - return false;  
349 - }  
350 - $.ajax({  
351 - url:"{:url('send')}",  
352 - type:"GET",  
353 - 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},  
354 - success:function(res){  
355 - console.log(res);  
356 - if (res.code == 1) {  
357 - $('.order_' + indent_id).remove();  
358 - $(".tx_maskone").css({  
359 - display: "none"  
360 - });  
361 - $(".tx_mask").css({  
362 - display: "none"  
363 - });  
364 - $('.send').remove();  
365 - var html = "<a href=\"{:url('logistics/index','',false,true)}/indent_id/"+indent_id+"\">\n" +  
366 - " <div class=\"log_seven_btn_contant\">\n" +  
367 - " 查看物流\n" +  
368 - " </div>\n" +  
369 - " </a>";  
370 - $('.log_seven_btn9').html(html) 353 + $.ajax({
  354 + url: "{:url('send')}",
  355 + type: "GET",
  356 + data: {
  357 + 'indent_id': indent_id,
  358 + 'is_courier': is_courier,
  359 + 'logistic_name': logistic_name,
  360 + 'logistic_code': logistic_code,
  361 + 'start_time': start_time,
  362 + // 'end_time': end_time
  363 + },
  364 + success: function (res) {
  365 + console.log(res);
  366 + if (res.code == 1) {
  367 + $('.order_' + indent_id).remove();
  368 + $(".tx_maskone").css({
  369 + display: "none"
  370 + });
  371 + $(".tx_mask").css({
  372 + display: "none"
  373 + });
  374 + $('.send').remove();
  375 + var html = "<a href=\"{:url('logistics/index','',false,true)}/indent_id/" + indent_id + "\">\n" +
  376 + " <div class=\"log_seven_btn_contant\">\n" +
  377 + " 查看物流\n" +
  378 + " </div>\n" +
  379 + " </a>";
  380 + $('.log_seven_btn9').html(html)
  381 + window.location.href = "{:url('get_all')}";
  382 + }
  383 + alert(res.msg)
371 } 384 }
372 - alert(res.msg)  
373 - } 385 + })
374 }) 386 })
375 }) 387 })
376 -}) 388 +</script>
  389 +<script>
  390 + var dtpicker = new mui.DtPicker({
  391 + type: "datetime", //设置日历初始视图模式
  392 + beginDate: new Date(), //设置开始日期
  393 + labels: ['年', '月', '日', '时', '分', '秒'], //设置默认标签区域提示语
  394 + })
  395 + //统一配送选择时间
  396 + $(".tongyi_start_time").click(function () {
  397 + dtpicker.show(function (e) {
  398 + console.log(e);
  399 + $('.tongyi_start_time').text(e.text);
  400 + $('#start_time').val(e.text);
  401 + $('.tongyi_start_time').css('color', '#333333');
  402 + });
  403 + })
  404 +
  405 + function zZFun(e) {
  406 + window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
  407 + }
377 </script> 408 </script>
378 </body> 409 </body>
379 410