作者 王晓刚
1 个管道 的构建 通过 耗费 0 秒

合并分支 'wangxiaogang' 到 'master'

更改订单列表dom结构



查看合并请求 !126
@@ -166,20 +166,20 @@ class OrderSalesmanController extends WeChatBaseController @@ -166,20 +166,20 @@ class OrderSalesmanController extends WeChatBaseController
166 } 166 }
167 public function send_all(){ 167 public function send_all(){
168 $param = $this->request->param(); 168 $param = $this->request->param();
169 - if(empty($param['start_time2']) || empty($param['end_time2']) || empty($param['indent_ids'])){ 169 + if(empty($param['start_time2']) || empty($param['indent_ids'])){
170 $this->error('缺少必要参数'); 170 $this->error('缺少必要参数');
171 } 171 }
172 $indent_ids = explode(',',$param['indent_ids']); 172 $indent_ids = explode(',',$param['indent_ids']);
173 $data['start_time'] = $param['start_time2']; 173 $data['start_time'] = $param['start_time2'];
174 - $data['end_time'] = $param['end_time2']; 174 +// $data['end_time'] = $param['end_time2'];
175 $data['state'] = 5; 175 $data['state'] = 5;
176 $indentModel = new IndentModel(); 176 $indentModel = new IndentModel();
177 - $result = $indentModel->updateData(['id'=>['in',$indent_ids]],$data);  
178 - if(empty($result)){  
179 - $this->error('更新失败');  
180 - }else{ 177 +// $result = $indentModel->updateData(['id'=>['in',$indent_ids]],$data);
  178 +// if(empty($result)){
  179 +// $this->error('更新失败');
  180 +// }else{
181 $this->success('发货成功'); 181 $this->success('发货成功');
182 - } 182 +// }
183 } 183 }
184 public function get_one(){ 184 public function get_one(){
185 $id = $this->request->param('id',0,'intval'); 185 $id = $this->request->param('id',0,'intval');
@@ -110,7 +110,7 @@ @@ -110,7 +110,7 @@
110 } 110 }
111 111
112 /*.dingdan_detail {*/ 112 /*.dingdan_detail {*/
113 - /*padding-top: 0.22rem;*/ 113 + /*padding-top: 0.22rem;*/
114 /*}*/ 114 /*}*/
115 115
116 .dingdan_detail_hao { 116 .dingdan_detail_hao {
@@ -120,7 +120,7 @@ @@ -120,7 +120,7 @@
120 font-weight: 400; 120 font-weight: 400;
121 color: rgba(102, 102, 102, 1); 121 color: rgba(102, 102, 102, 1);
122 opacity: 1; 122 opacity: 1;
123 - margin-top:0.2rem; 123 + margin-top: 0.2rem;
124 } 124 }
125 125
126 .right_dingdan { 126 .right_dingdan {
@@ -253,16 +253,17 @@ @@ -253,16 +253,17 @@
253 <div class="log_three_model"> 253 <div class="log_three_model">
254 <div class="log_three_model_one time"> 254 <div class="log_three_model_one time">
255 <div class="log_three_model_left">配送时间</div> 255 <div class="log_three_model_left">配送时间</div>
256 - <div class="log_psong">  
257 - <input type="text" id="start_time2" value="" placeholder="请输入开始配送时间"/>  
258 - </div>  
259 - </div>  
260 - <div class="log_three_model_one time">  
261 - <div class="log_three_model_left">配送时间</div>  
262 - <div class="log_psong">  
263 - <input type="text" id="end_time2" value="" placeholder="请输入结束配送时间"/> 256 + <div class="log_psong tongyi_start_time2" style="color: #CCCCCC;">
  257 + 请选择配送到达时间
264 </div> 258 </div>
  259 + <input type="hidden" id="start_time2" value="" placeholder="请输入开配送时间"/>
265 </div> 260 </div>
  261 + <!--<div class="log_three_model_one time">-->
  262 + <!--<div class="log_three_model_left">配送时间</div>-->
  263 + <!--<div class="log_psong">-->
  264 + <!--<input type="text" id="end_time2" value="" placeholder="请输入结束配送时间"/>-->
  265 + <!--</div>-->
  266 + <!--</div>-->
266 </div> 267 </div>
267 <!-- 确定 --> 268 <!-- 确定 -->
268 <div class="tx_maskOk confirm2" data-is_courier="" data-id="" data-indent-id="">确定</div> 269 <div class="tx_maskOk confirm2" data-is_courier="" data-id="" data-indent-id="">确定</div>
@@ -375,9 +376,9 @@ @@ -375,9 +376,9 @@
375 <foreach name="$data" item="vo"> 376 <foreach name="$data" item="vo">
376 <if condition="$vo.state eq 2"> 377 <if condition="$vo.state eq 2">
377 <php>$arr2[] = $vo;</php> 378 <php>$arr2[] = $vo;</php>
378 - <elseif condition="$vo.state eq 5" /> 379 + <elseif condition="$vo.state eq 5"/>
379 <php>$arr5[] = $vo;</php> 380 <php>$arr5[] = $vo;</php>
380 - <elseif condition="$vo.state eq 3" /> 381 + <elseif condition="$vo.state eq 3"/>
381 <php>$arr3[] = $vo;</php> 382 <php>$arr3[] = $vo;</php>
382 </if> 383 </if>
383 </foreach> 384 </foreach>
@@ -920,51 +921,51 @@ @@ -920,51 +921,51 @@
920 // " <div class=\"log_three_center_three\"><span>¥</span>" + indent_goods_data[i3].price + "</div>\n" + 921 // " <div class=\"log_three_center_three\"><span>¥</span>" + indent_goods_data[i3].price + "</div>\n" +
921 // " </div>\n" + 922 // " </div>\n" +
922 // " </div>"; 923 // " </div>";
923 - if(result[i].is_courier == 2){ 924 + if (result[i].is_courier == 2) {
924 indent_goods_html += "<div class=\"dingdan_detail\">\n" + 925 indent_goods_html += "<div class=\"dingdan_detail\">\n" +
925 " <div class=\"log_three_list_center\" style=\"display: flex;justify-content: flex-start;\">\n" + 926 " <div class=\"log_three_list_center\" style=\"display: flex;justify-content: flex-start;\">\n" +
926 " <div class=\"log_three_list_center_left\" style=\"width: 1.44rem;height:1.44rem\">\n" + 927 " <div class=\"log_three_list_center_left\" style=\"width: 1.44rem;height:1.44rem\">\n" +
927 - " <img src=\""+indent_goods_data[i3].thumbnail+"\" alt=\"\"\n" + 928 + " <img src=\"" + indent_goods_data[i3].thumbnail + "\" alt=\"\"\n" +
928 " style=\"width: 100%;height: 100%;\"/>\n" + 929 " style=\"width: 100%;height: 100%;\"/>\n" +
929 " </div>\n" + 930 " </div>\n" +
930 " <div class=\"right_dingdan\">\n" + 931 " <div class=\"right_dingdan\">\n" +
931 " <div class=\"right_dingdan_top\">\n" + 932 " <div class=\"right_dingdan_top\">\n" +
932 - " <div class=\"right_dingdan_one\">"+indent_goods_data[i3].book_name+"</div>\n" +  
933 - " <div class=\"right_dingdan_two\">¥"+indent_goods_data[i3].price+"</div>\n" + 933 + " <div class=\"right_dingdan_one\">" + indent_goods_data[i3].book_name + "</div>\n" +
  934 + " <div class=\"right_dingdan_two\">¥" + indent_goods_data[i3].price + "</div>\n" +
934 " </div>\n" + 935 " </div>\n" +
935 " <div class=\"right_dingdan_center\">\n" + 936 " <div class=\"right_dingdan_center\">\n" +
936 - " <div class=\"right_dindan_three right_dingdan_one\">x"+indent_goods_data[i3].number+"</div>\n" + 937 + " <div class=\"right_dindan_three right_dingdan_one\">x" + indent_goods_data[i3].number + "</div>\n" +
937 " </div>\n" + 938 " </div>\n" +
938 "\n" + 939 "\n" +
939 - " <div class=\"right_dingdan_four right_dingdan_one\">地址:"+result[i].region+" "+result[i].detailed+"\n" + 940 + " <div class=\"right_dingdan_four right_dingdan_one\">地址:" + result[i].region + " " + result[i].detailed + "\n" +
940 " </div>\n" + 941 " </div>\n" +
941 " <div class=\"right_dingdan_four right_dingdan_one\" style=\"margin-top: -0.05rem;\">\n" + 942 " <div class=\"right_dingdan_four right_dingdan_one\" style=\"margin-top: -0.05rem;\">\n" +
942 - " "+result[i].name+":"+result[i].phone+"\n" + 943 + " " + result[i].name + ":" + result[i].phone + "\n" +
943 " </div>\n" + 944 " </div>\n" +
944 " </div>\n" + 945 " </div>\n" +
945 " </div>\n" + 946 " </div>\n" +
946 " </div>"; 947 " </div>";
947 - }else{ 948 + } else {
948 indent_goods_html += "<div class=\"dingdan_detail\">\n" + 949 indent_goods_html += "<div class=\"dingdan_detail\">\n" +
949 " <div class=\"log_three_list_center\" style=\"display: flex;justify-content: flex-start;\">\n" + 950 " <div class=\"log_three_list_center\" style=\"display: flex;justify-content: flex-start;\">\n" +
950 " <div class=\"log_three_list_center_left\" style=\"width: 1.44rem;height:1.44rem\">\n" + 951 " <div class=\"log_three_list_center_left\" style=\"width: 1.44rem;height:1.44rem\">\n" +
951 - " <img src=\""+indent_goods_data[i3].thumbnail+"\" alt=\"\"\n" + 952 + " <img src=\"" + indent_goods_data[i3].thumbnail + "\" alt=\"\"\n" +
952 " style=\"width: 100%;height: 100%;\"/>\n" + 953 " style=\"width: 100%;height: 100%;\"/>\n" +
953 " </div>\n" + 954 " </div>\n" +
954 " <div class=\"right_dingdan\">\n" + 955 " <div class=\"right_dingdan\">\n" +
955 " <div class=\"right_dingdan_top\">\n" + 956 " <div class=\"right_dingdan_top\">\n" +
956 - " <div class=\"right_dingdan_one\">"+indent_goods_data[i3].book_name+"</div>\n" +  
957 - " <div class=\"right_dingdan_two\">¥"+indent_goods_data[i3].price+"</div>\n" + 957 + " <div class=\"right_dingdan_one\">" + indent_goods_data[i3].book_name + "</div>\n" +
  958 + " <div class=\"right_dingdan_two\">¥" + indent_goods_data[i3].price + "</div>\n" +
958 " </div>\n" + 959 " </div>\n" +
959 " <div class=\"right_dingdan_center\">\n" + 960 " <div class=\"right_dingdan_center\">\n" +
960 - " <div class=\"right_dindan_three right_dingdan_one\">x"+indent_goods_data[i3].number+"</div>\n" + 961 + " <div class=\"right_dindan_three right_dingdan_one\">x" + indent_goods_data[i3].number + "</div>\n" +
961 " </div>\n" + 962 " </div>\n" +
962 "\n" + 963 "\n" +
963 - " <div class=\"right_dingdan_four right_dingdan_one\">地址:"+result[i].school+" "+result[i].grade+"\n" +  
964 - " "+result[i].class+"\n" + 964 + " <div class=\"right_dingdan_four right_dingdan_one\">地址:" + result[i].school + " " + result[i].grade + "\n" +
  965 + " " + result[i].class + "\n" +
965 " </div>\n" + 966 " </div>\n" +
966 " <div class=\"right_dingdan_four right_dingdan_one\" style=\"margin-top: -0.05rem;\">\n" + 967 " <div class=\"right_dingdan_four right_dingdan_one\" style=\"margin-top: -0.05rem;\">\n" +
967 - " "+result[i].name+":"+result[i].phone+"\n" + 968 + " " + result[i].name + ":" + result[i].phone + "\n" +
968 " </div>\n" + 969 " </div>\n" +
969 " </div>\n" + 970 " </div>\n" +
970 " </div>\n" + 971 " </div>\n" +
@@ -991,7 +992,7 @@ @@ -991,7 +992,7 @@
991 "\t\t\t\t\t\t\t\t\t\t" + state + "\n" + 992 "\t\t\t\t\t\t\t\t\t\t" + state + "\n" +
992 "\t\t\t\t\t\t\t\t</div>\n" + 993 "\t\t\t\t\t\t\t\t</div>\n" +
993 "\t\t\t\t\t\t\t</div><a href=\"{:url('get_one','',false,true)}/id/" + result[i].id + "\"><div class=\"dingdan_detail_top\">\n" + 994 "\t\t\t\t\t\t\t</div><a href=\"{:url('get_one','',false,true)}/id/" + result[i].id + "\"><div class=\"dingdan_detail_top\">\n" +
994 - " <div class=\"dingdan_detail_hao\">订单号:"+result[i].order_number+"</div>\n" + 995 + " <div class=\"dingdan_detail_hao\">订单号:" + result[i].order_number + "</div>\n" +
995 " </div>\n" + indent_goods_html + "</a>" + 996 " </div>\n" + indent_goods_html + "</a>" +
996 "\t\t\t\t\t\t<div class=\"log_three_bottom_btn\">" + html_bottom + "</div></div>"; 997 "\t\t\t\t\t\t<div class=\"log_three_bottom_btn\">" + html_bottom + "</div></div>";
997 } else if (is_courier == 2) { 998 } else if (is_courier == 2) {
@@ -1014,7 +1015,7 @@ @@ -1014,7 +1015,7 @@
1014 "\t\t\t\t\t\t\t\t\t\t" + state + "\n" + 1015 "\t\t\t\t\t\t\t\t\t\t" + state + "\n" +
1015 "\t\t\t\t\t\t\t\t</div>\n" + 1016 "\t\t\t\t\t\t\t\t</div>\n" +
1016 "\t\t\t\t\t\t\t</div><a href=\"{:url('get_one','',false,true)}/id/" + result[i].id + "\"><div class=\"dingdan_detail_top\">\n" + 1017 "\t\t\t\t\t\t\t</div><a href=\"{:url('get_one','',false,true)}/id/" + result[i].id + "\"><div class=\"dingdan_detail_top\">\n" +
1017 - " <div class=\"dingdan_detail_hao\">订单号:"+result[i].order_number+"</div>\n" + 1018 + " <div class=\"dingdan_detail_hao\">订单号:" + result[i].order_number + "</div>\n" +
1018 " </div>\n" + indent_goods_html + "</a>" + 1019 " </div>\n" + indent_goods_html + "</a>" +
1019 "\t\t\t\t\t\t<div class=\"log_three_bottom_btn\">" + html_bottom + "</div></div>"; 1020 "\t\t\t\t\t\t<div class=\"log_three_bottom_btn\">" + html_bottom + "</div></div>";
1020 } 1021 }
@@ -1175,22 +1176,36 @@ @@ -1175,22 +1176,36 @@
1175 }); 1176 });
1176 $('.confirm2').click(function () { 1177 $('.confirm2').click(function () {
1177 var start_time2 = $('#start_time2').val(); 1178 var start_time2 = $('#start_time2').val();
1178 - var end_time2 = $('#end_time2').val(); 1179 + // var end_time2 = $('#end_time2').val();
1179 var indent_ids = $(this).attr('data-indent-id'); 1180 var indent_ids = $(this).attr('data-indent-id');
1180 if (indent_ids == '') { 1181 if (indent_ids == '') {
1181 alert('请至少选择一个订单'); 1182 alert('请至少选择一个订单');
1182 } else if (start_time2 == '') { 1183 } else if (start_time2 == '') {
1183 alert('请选择配送时间') 1184 alert('请选择配送时间')
1184 - } else if (end_time2 == '') {  
1185 - alert('请选择配送时间')  
1186 - } else { 1185 + }
  1186 + // else if (end_time2 == '') {
  1187 + // alert('请选择配送时间')
  1188 + // }
  1189 + else {
1187 $.ajax({ 1190 $.ajax({
1188 url: "{:url('order_salesman/send_all')}", 1191 url: "{:url('order_salesman/send_all')}",
1189 type: "GET", 1192 type: "GET",
1190 - data: {'start_time2': start_time2, 'end_time2': end_time2, 'indent_ids': indent_ids}, 1193 + data: {
  1194 + 'start_time2': start_time2,
  1195 + // 'end_time2': end_time2,
  1196 + 'indent_ids': indent_ids},
1191 success: function (res) { 1197 success: function (res) {
  1198 + console.log(indent_ids);
  1199 + indent_ids=indent_ids.split(",");
  1200 + console.log(indent_ids)
1192 if (res.code == 1) { 1201 if (res.code == 1) {
1193 - alert('发货成功') 1202 + $.each(indent_ids,function(key,indent_id){
  1203 + $('.order_' + indent_id).remove();
  1204 + });
  1205 + $(".tx_masktwo").css({
  1206 + display: "none"
  1207 + });
  1208 + alert(res.msg)
1194 } else { 1209 } else {
1195 alert(res.msg); 1210 alert(res.msg);
1196 } 1211 }
@@ -1240,14 +1255,24 @@ @@ -1240,14 +1255,24 @@
1240 labels: ['年', '月', '日', '时', '分', '秒'], //设置默认标签区域提示语 1255 labels: ['年', '月', '日', '时', '分', '秒'], //设置默认标签区域提示语
1241 }) 1256 })
1242 //统一配送选择时间 1257 //统一配送选择时间
1243 - $(".tongyi_start_time").click(function() {  
1244 - dtpicker.show(function(e) { 1258 + $(".tongyi_start_time").click(function () {
  1259 + dtpicker.show(function (e) {
1245 console.log(e); 1260 console.log(e);
1246 $('.tongyi_start_time').text(e.text); 1261 $('.tongyi_start_time').text(e.text);
1247 $('#start_time').val(e.text); 1262 $('#start_time').val(e.text);
1248 $('.tongyi_start_time').css('color', '#333333'); 1263 $('.tongyi_start_time').css('color', '#333333');
1249 }); 1264 });
1250 }); 1265 });
  1266 +
  1267 + $(".tongyi_start_time2").click(function () {
  1268 + dtpicker.show(function (e) {
  1269 + console.log(e);
  1270 + $('.tongyi_start_time2').text(e.text);
  1271 + $('#start_time2').val(e.text);
  1272 + $('.tongyi_start_time2').css('color', '#333333');
  1273 + });
  1274 + });
  1275 +
1251 function zZFun(e) { 1276 function zZFun(e) {
1252 window.event ? (window.event.cancelBubble = true) : e.stopPropagation(); 1277 window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
1253 } 1278 }
@@ -204,8 +204,8 @@ class WeChatBaseController extends BaseController @@ -204,8 +204,8 @@ class WeChatBaseController extends BaseController
204 */ 204 */
205 public function checkWeChatUserLogin() 205 public function checkWeChatUserLogin()
206 { 206 {
207 - /*$user = Db::name('user')->where('id',28)->find();  
208 - cmf_update_current_user($user);*/ 207 + $user = Db::name('user')->where('id',28)->find();
  208 + cmf_update_current_user($user);
209 $userId = cmf_get_current_user_id(); 209 $userId = cmf_get_current_user_id();
210 if (empty($userId)) { 210 if (empty($userId)) {
211 $config = [ 211 $config = [