正在显示
4 个修改的文件
包含
1825 行增加
和
102 行删除
@@ -14,6 +14,7 @@ use app\portal\model\IndentGoodsModel; | @@ -14,6 +14,7 @@ use app\portal\model\IndentGoodsModel; | ||
14 | use app\portal\model\IndentModel; | 14 | use app\portal\model\IndentModel; |
15 | use cmf\controller\WeChatBaseController; | 15 | use cmf\controller\WeChatBaseController; |
16 | use think\Db; | 16 | use think\Db; |
17 | +use think\Image; | ||
17 | 18 | ||
18 | class OrderSalesmanController extends WeChatBaseController | 19 | class OrderSalesmanController extends WeChatBaseController |
19 | { | 20 | { |
@@ -189,23 +190,6 @@ class OrderSalesmanController extends WeChatBaseController | @@ -189,23 +190,6 @@ class OrderSalesmanController extends WeChatBaseController | ||
189 | if(empty($indent)){ | 190 | if(empty($indent)){ |
190 | $this->error('查询为空'); | 191 | $this->error('查询为空'); |
191 | } | 192 | } |
192 | - if($indent['is_courier'] == 1){ | ||
193 | - $school = Db::name('school')->where(['region'=>$indent['region'],'uid'=>$indent['salesman_uid']])->select(); | ||
194 | - $arr1 = []; | ||
195 | - foreach($school as $key => $s){ | ||
196 | - $arr1[$key]['value'] = $s['id']; | ||
197 | - $arr1[$key]['text'] = $s['school']; | ||
198 | - } | ||
199 | - $school_id = Db::name('school')->where(['region'=>$indent['region'],'uid'=>$indent['salesman_uid']])->value('id'); | ||
200 | - $grade = Db::name('grade_class')->where(['school_id'=>$school_id])->select()->toArray(); | ||
201 | - foreach($grade as $key => $g){ | ||
202 | - $class = explode('-',$g['class']); | ||
203 | - $grade[$key]['start'] = $class[0]; | ||
204 | - $grade[$key]['end'] = $class[1]; | ||
205 | - } | ||
206 | - $this->assign('school',json_encode($arr1)); | ||
207 | - $this->assign('grade',$grade); | ||
208 | - } | ||
209 | $indentGoodsModel = new IndentGoodsModel(); | 193 | $indentGoodsModel = new IndentGoodsModel(); |
210 | $indent_goods = $indentGoodsModel->selectData(['indent_id'=>$indent['id']]); | 194 | $indent_goods = $indentGoodsModel->selectData(['indent_id'=>$indent['id']]); |
211 | if(!empty($indent['indent_address'])){ | 195 | if(!empty($indent['indent_address'])){ |
@@ -242,36 +226,49 @@ class OrderSalesmanController extends WeChatBaseController | @@ -242,36 +226,49 @@ class OrderSalesmanController extends WeChatBaseController | ||
242 | $this->success('更新成功'); | 226 | $this->success('更新成功'); |
243 | } | 227 | } |
244 | } | 228 | } |
245 | - public function updatePost(){ | ||
246 | - $param = $this->request->param(); | ||
247 | - $indent_id = $this->request->param('indent_id',0,'intval'); | ||
248 | - if(empty($indent_id)){ | ||
249 | - $this->error('缺少必要参数123'); | 229 | + |
230 | + public function upload_img() { | ||
231 | + if($this->request->isAjax()) { | ||
232 | + $img = $this->request->param('img'); | ||
233 | + $top = $this->request->param('top'); | ||
234 | + if($img) { | ||
235 | + $img_url = $this->base64_image_content($img,'./upload'); | ||
236 | + $new_img = Image::open('./upload/'.$img_url); | ||
237 | + $width = $new_img->width(); | ||
238 | + $height = $new_img->height(); | ||
239 | + $new_img->thumb($width,$height - intval($top) * 2,5); | ||
240 | + $new_img->save('./upload/'.$img_url); | ||
241 | + $this->success('成功','',cmf_get_asset_url($img_url)); | ||
242 | + } | ||
250 | } | 243 | } |
251 | - $indentModel = new IndentModel(); | ||
252 | - $data = $indentModel->findData(['id'=>$indent_id]); | ||
253 | - if($data['is_courier'] == 1){ | ||
254 | - if(empty($param['name']) || empty($param['region']) || empty($param['school']) || empty($param['grade_class']) || empty($param['phone'])){ | ||
255 | - $this->error('缺少必要参数'); | 244 | + } |
245 | + | ||
246 | + /** | ||
247 | + * [将Base64图片转换为本地图片并保存] | ||
248 | + * @E-mial wuliqiang_aa@163.com | ||
249 | + * @TIME 2017-04-07 | ||
250 | + * @WEB http://blog.iinu.com.cn | ||
251 | + * @param [Base64] $base64_image_content [要保存的Base64] | ||
252 | + * @param [目录] $path [要保存的路径] | ||
253 | + */ | ||
254 | + private function base64_image_content($base64_image_content,$path){ | ||
255 | + //匹配出图片的格式 | ||
256 | + if (preg_match('/^(data:\s*image\/(\w+);base64,)/', $base64_image_content, $result)){ | ||
257 | + $type = $result[2]; | ||
258 | + $file_path = "order_img/"; | ||
259 | + $new_file = $path."/".$file_path; | ||
260 | + if(!file_exists($new_file)){ | ||
261 | + //检查是否有该文件夹,如果没有就创建,并给予最高权限 | ||
262 | + mkdir($new_file, 0700); | ||
256 | } | 263 | } |
257 | - $grade_class = explode('-',$param['grade_class']); | ||
258 | - $arr['name'] = $param['name']; | ||
259 | - $arr['phone'] = $param['phone']; | ||
260 | - $arr['region'] = $param['region']; | ||
261 | - $arr['school'] = $param['school']; | ||
262 | - $arr['grade'] = $grade_class[0]; | ||
263 | - $arr['class'] = $grade_class[1]; | ||
264 | - $result = $indentModel ->updateData(['id'=>$indent_id],$arr); | ||
265 | - }else if($data['is_courier'] == 2){ | ||
266 | - if(empty($param['name']) || empty($param['phone']) || empty($param['region']) || empty($param['region_detail'])){ | ||
267 | - $this->error('缺少必要参数123'); | 264 | + $new_file = $new_file.cmf_get_current_user_id().".{$type}"; |
265 | + if (file_put_contents($new_file, base64_decode(str_replace($result[1], '', $base64_image_content)))){ | ||
266 | + return $file_path.cmf_get_current_user_id().".{$type}"; | ||
267 | + }else{ | ||
268 | + return false; | ||
268 | } | 269 | } |
269 | - $arr['name'] = $param['name']; | ||
270 | - $arr['phone'] = $param['phone']; | ||
271 | - $arr['region'] = $param['region']; | ||
272 | - $arr['region_detail'] = $param['region_detail']; | ||
273 | - $result = $indentModel ->updateData(['id'=>$indent_id],$arr); | 270 | + }else{ |
271 | + return false; | ||
274 | } | 272 | } |
275 | - $this->success('SUCCESS'); | ||
276 | } | 273 | } |
277 | } | 274 | } |
1 | +<?php | ||
2 | +/** | ||
3 | + * Created by PhpStorm. | ||
4 | + * User: Administrator | ||
5 | + * Date: 2019/6/9 | ||
6 | + * Time: 15:34 | ||
7 | + */ | ||
8 | + | ||
9 | +namespace app\portal\controller; | ||
10 | + | ||
11 | + | ||
12 | +use app\portal\model\AddressModel; | ||
13 | +use app\portal\model\IndentGoodsModel; | ||
14 | +use app\portal\model\IndentModel; | ||
15 | +use cmf\controller\WeChatBaseController; | ||
16 | +use think\Db; | ||
17 | + | ||
18 | +class OrderSalesmanController extends WeChatBaseController | ||
19 | +{ | ||
20 | + protected $user_id; | ||
21 | + protected $beforeActionList = [ | ||
22 | + 'check' => ['except' => 'getGradeClass'], | ||
23 | + ]; | ||
24 | + | ||
25 | + protected function check() { | ||
26 | + $user_id = cmf_get_current_user_id(); | ||
27 | + $this->user_id = $user_id; | ||
28 | + $my_user = Db::name('my_user')->where(['uid'=>$user_id])->find(); | ||
29 | + if(empty($my_user)){ | ||
30 | + $this->error('查无此人','','',''); | ||
31 | + } | ||
32 | + if($my_user['status'] != 2){ | ||
33 | + $this->error('您还不是业务员那','','',''); | ||
34 | + } | ||
35 | + } | ||
36 | + public function get_all(){ | ||
37 | + $param = $this->request->param(); | ||
38 | + if(!empty($param['is_courier'])){ | ||
39 | + $where['is_courier'] = ['eq',$param['is_courier']]; | ||
40 | + } | ||
41 | + $user_id = $this->user_id; | ||
42 | + $where['salesman_uid'] = ['eq',$user_id]; | ||
43 | + $where['indent_type'] = ['eq',2]; | ||
44 | + $where['state'] = ['neq',4]; | ||
45 | + $indentModel = new IndentModel(); | ||
46 | + $data = $indentModel->selectData($where); | ||
47 | + $indentGoodsModel = new IndentGoodsModel(); | ||
48 | + foreach($data as $key => $vo){ | ||
49 | + $indent_goods = $indentGoodsModel->selectData(['indent_id'=>$vo['id']]); | ||
50 | + $data[$key]['indent_goods'] = $indent_goods; | ||
51 | + //判断订单是不是平台订单 | ||
52 | + if($vo['indent_type'] == 1){ | ||
53 | + $data[$key]['dizhi'] = Db::name('address') -> where('id',$vo['indent_address']) -> find(); | ||
54 | + } | ||
55 | + } | ||
56 | + $school = Db::name('school')->where('uid',$user_id)->order('create_time desc')->select()->toArray(); | ||
57 | + if(count($school)!=0){ | ||
58 | + foreach ($school as $key => $val){ | ||
59 | + $schools[$key]['value'] = $val['id']; | ||
60 | + $schools[$key]['text'] = $val['school']; | ||
61 | + } | ||
62 | + $this->assign('school',json_encode($schools)); | ||
63 | + }else{ | ||
64 | + $this->assign('school',''); | ||
65 | + } | ||
66 | + | ||
67 | + $this->assign('data',$data); | ||
68 | + return $this->fetch(); | ||
69 | + } | ||
70 | + public function getGradeClass(){ | ||
71 | + $school_id = $this->request->param('school_id',0,'intval'); | ||
72 | + if(empty($school_id)){ | ||
73 | + $this->error('缺少必要参数'); | ||
74 | + } | ||
75 | + $grade = Db::name('grade_class')->where(['school_id'=>$school_id])->select()->toArray(); | ||
76 | + foreach($grade as $key => $g){ | ||
77 | + $class = explode('-',$g['class']); | ||
78 | + $grade[$key]['start'] = $class[0]; | ||
79 | + $grade[$key]['end'] = $class[1]; | ||
80 | + } | ||
81 | + $this->success('SUCCESS','',$grade); | ||
82 | + } | ||
83 | + public function getOrderSalesman(){ | ||
84 | + $param = $this->request->param(); | ||
85 | + if(!empty($param['school'])){ | ||
86 | + $where['school'] = ['eq',$param['school']]; | ||
87 | + } | ||
88 | + if(!empty($param['grade'])){ | ||
89 | + $param['grade'] = explode(' - ',$param['grade']); | ||
90 | + $where['grade'] = ['eq',$param['grade'][0]]; | ||
91 | + $where['class'] = ['eq',$param['grade'][1]]; | ||
92 | + } | ||
93 | + if(!empty($param['state'])){ | ||
94 | + $where['state'] = ['eq',$param['state']]; | ||
95 | + }else{ | ||
96 | + $where['state'] = ['neq',4]; | ||
97 | + } | ||
98 | + if(!empty($param['is_courier'])){ | ||
99 | + $where['is_courier'] = ['eq',$param['is_courier']]; | ||
100 | + }else{ | ||
101 | + $where['is_courier'] = ['eq',1]; | ||
102 | + } | ||
103 | + $user_id = $this->user_id; | ||
104 | + $where['salesman_uid'] = ['eq',$user_id]; | ||
105 | + $where['indent_type'] = ['eq',2]; | ||
106 | + $indentModel = new IndentModel(); | ||
107 | + $data = $indentModel->selectData($where); | ||
108 | + $indentGoodsModel = new IndentGoodsModel(); | ||
109 | + foreach($data as $key => $vo){ | ||
110 | + $indent_goods = $indentGoodsModel->selectData(['indent_id'=>$vo['id']]); | ||
111 | + $data[$key]['indent_goods'] = $indent_goods; | ||
112 | + if($vo['is_courier'] == 2){ | ||
113 | + $address = Db::name('address')->where(['id'=>$vo['indent_address']])->find(); | ||
114 | + $data[$key]['region'] = $address['region']; | ||
115 | + $data[$key]['detailed'] = $address['detailed']; | ||
116 | + $data[$key]['phone'] = $address['phone']; | ||
117 | + } | ||
118 | + } | ||
119 | + $this->success('SUCCESS','',$data); | ||
120 | + } | ||
121 | + public function send(){ | ||
122 | + $param = $this->request->param(); | ||
123 | + if(empty($param['is_courier'])){ | ||
124 | + $this->error('缺少必要参数1'); | ||
125 | + } | ||
126 | + if($param['is_courier'] == 1){ | ||
127 | + if(empty($param['start_time'])){ | ||
128 | + $this->error('缺少必要参数2'); | ||
129 | + } | ||
130 | +// if(empty($param['end_time'])){ | ||
131 | +// $this->error('缺少必要参数3'); | ||
132 | +// } | ||
133 | + }else if($param['is_courier'] == 2){ | ||
134 | + if(empty($param['logistic_name'])){ | ||
135 | + $this->error('缺少必要参数4'); | ||
136 | + } | ||
137 | + if(empty($param['logistic_code'])){ | ||
138 | + $this->error('缺少必要参数5'); | ||
139 | + } | ||
140 | + } | ||
141 | + if(empty($param['indent_id'])){ | ||
142 | + $this->error('缺少必要参数6'); | ||
143 | + } | ||
144 | + $where['id'] = ['eq',$param['indent_id']]; | ||
145 | + $indentModel = new IndentModel(); | ||
146 | + $indent = $indentModel->findData($where); | ||
147 | + if(empty($indent)){ | ||
148 | + $this->error('查询为空'); | ||
149 | + } | ||
150 | + if($indent['state'] != 2){ | ||
151 | + $this->error('订单不是待支付状态'); | ||
152 | + } | ||
153 | + $arr = []; | ||
154 | + if($param['is_courier'] == 1){ | ||
155 | + $arr['start_time'] = $param['start_time']; | ||
156 | +// $arr['end_time'] = $param['end_time']; | ||
157 | + }else if($param['is_courier'] == 2){ | ||
158 | + $arr['logistic_name'] = $param['logistic_name']; | ||
159 | + $arr['logistic_code'] = $param['logistic_code']; | ||
160 | + } | ||
161 | + $arr['state'] = 5; | ||
162 | + $result = $indentModel->updateData($where,$arr);//// | ||
163 | + $this->success('发货成功'); | ||
164 | + } | ||
165 | + public function send_all(){ | ||
166 | + $param = $this->request->param(); | ||
167 | + if(empty($param['start_time2']) || empty($param['indent_ids'])){ | ||
168 | + $this->error('缺少必要参数'); | ||
169 | + } | ||
170 | + $indent_ids = explode(',',$param['indent_ids']); | ||
171 | + $data['start_time'] = $param['start_time2']; | ||
172 | +// $data['end_time'] = $param['end_time2']; | ||
173 | + $data['state'] = 5; | ||
174 | + $indentModel = new IndentModel(); | ||
175 | + $result = $indentModel->updateData(['id'=>['in',$indent_ids]],$data); | ||
176 | + if(empty($result)){ | ||
177 | + $this->error('更新失败'); | ||
178 | + }else{ | ||
179 | + $this->success('发货成功'); | ||
180 | + } | ||
181 | + } | ||
182 | + public function get_one(){ | ||
183 | + $id = $this->request->param('id',0,'intval'); | ||
184 | + if(empty($id)){ | ||
185 | + $this->error('缺少必参数','','',''); | ||
186 | + } | ||
187 | + $indentModel = new IndentModel(); | ||
188 | + $indent = $indentModel->findData(['id'=>$id])->toArray(); | ||
189 | + if(empty($indent)){ | ||
190 | + $this->error('查询为空'); | ||
191 | + } | ||
192 | + if($indent['is_courier'] == 1){ | ||
193 | + $school = Db::name('school')->where(['region'=>$indent['region'],'uid'=>$indent['salesman_uid']])->select(); | ||
194 | + $arr1 = []; | ||
195 | + foreach($school as $key => $s){ | ||
196 | + $arr1[$key]['value'] = $s['id']; | ||
197 | + $arr1[$key]['text'] = $s['school']; | ||
198 | + } | ||
199 | + $school_id = Db::name('school')->where(['region'=>$indent['region'],'uid'=>$indent['salesman_uid']])->value('id'); | ||
200 | + $grade = Db::name('grade_class')->where(['school_id'=>$school_id])->select()->toArray(); | ||
201 | + foreach($grade as $key => $g){ | ||
202 | + $class = explode('-',$g['class']); | ||
203 | + $grade[$key]['start'] = $class[0]; | ||
204 | + $grade[$key]['end'] = $class[1]; | ||
205 | + } | ||
206 | + $this->assign('school',json_encode($arr1)); | ||
207 | + $this->assign('grade',$grade); | ||
208 | + } | ||
209 | + $indentGoodsModel = new IndentGoodsModel(); | ||
210 | + $indent_goods = $indentGoodsModel->selectData(['indent_id'=>$indent['id']]); | ||
211 | + if(!empty($indent['indent_address'])){ | ||
212 | + $addressModel = new AddressModel(); | ||
213 | + $indent_address = $addressModel->findData(['id'=>$indent['indent_address']])->toArray(); | ||
214 | + $indent['indent_address'] = $indent_address; | ||
215 | + } | ||
216 | + $indent['indent_goods'] = $indent_goods; | ||
217 | + $this->assign('data',$indent); | ||
218 | + return $this->fetch(); | ||
219 | + } | ||
220 | + public function take_all(){ | ||
221 | + $indent_ids = $this->request->param('indent_ids'); | ||
222 | + $data['state'] = 3; | ||
223 | + $indent_ids = explode(',',$indent_ids); | ||
224 | + $where['id'] = ['in',$indent_ids]; | ||
225 | + $indentModel = new IndentModel(); | ||
226 | + $result = $indentModel->updateData($where,$data); | ||
227 | + if(empty($result)){ | ||
228 | + $this->error('更新失败'); | ||
229 | + }else{ | ||
230 | + $this->success('更新成功'); | ||
231 | + } | ||
232 | + } | ||
233 | + public function take_one(){ | ||
234 | + $indent_id = $this->request->param('indent_id'); | ||
235 | + $data['state'] = 3; | ||
236 | + $where['id'] = ['eq',$indent_id]; | ||
237 | + $indentModel = new IndentModel(); | ||
238 | + $result = $indentModel->updateData($where,$data); | ||
239 | + if(empty($result)){ | ||
240 | + $this->error('更新失败'); | ||
241 | + }else{ | ||
242 | + $this->success('更新成功'); | ||
243 | + } | ||
244 | + } | ||
245 | + public function updatePost(){ | ||
246 | + $param = $this->request->param(); | ||
247 | + $indent_id = $this->request->param('indent_id',0,'intval'); | ||
248 | + if(empty($indent_id)){ | ||
249 | + $this->error('缺少必要参数123'); | ||
250 | + } | ||
251 | + $indentModel = new IndentModel(); | ||
252 | + $data = $indentModel->findData(['id'=>$indent_id]); | ||
253 | + if($data['is_courier'] == 1){ | ||
254 | + if(empty($param['name']) || empty($param['region']) || empty($param['school']) || empty($param['grade_class']) || empty($param['phone'])){ | ||
255 | + $this->error('缺少必要参数'); | ||
256 | + } | ||
257 | + $grade_class = explode('-',$param['grade_class']); | ||
258 | + $arr['name'] = $param['name']; | ||
259 | + $arr['phone'] = $param['phone']; | ||
260 | + $arr['region'] = $param['region']; | ||
261 | + $arr['school'] = $param['school']; | ||
262 | + $arr['grade'] = $grade_class[0]; | ||
263 | + $arr['class'] = $grade_class[1]; | ||
264 | + $result = $indentModel ->updateData(['id'=>$indent_id],$arr); | ||
265 | + }else if($data['is_courier'] == 2){ | ||
266 | + if(empty($param['name']) || empty($param['phone']) || empty($param['region']) || empty($param['region_detail'])){ | ||
267 | + $this->error('缺少必要参数123'); | ||
268 | + } | ||
269 | + $arr['name'] = $param['name']; | ||
270 | + $arr['phone'] = $param['phone']; | ||
271 | + $arr['region'] = $param['region']; | ||
272 | + $arr['region_detail'] = $param['region_detail']; | ||
273 | + $result = $indentModel ->updateData(['id'=>$indent_id],$arr); | ||
274 | + } | ||
275 | + $this->success('SUCCESS'); | ||
276 | + } | ||
277 | +} |
@@ -194,7 +194,7 @@ | @@ -194,7 +194,7 @@ | ||
194 | </style> | 194 | </style> |
195 | </head> | 195 | </head> |
196 | 196 | ||
197 | -<body style="cursor:pointer;background: #fff"> | 197 | +<body style="cursor:pointer;"> |
198 | 198 | ||
199 | 199 | ||
200 | <!--学校弹窗--> | 200 | <!--学校弹窗--> |
@@ -398,9 +398,6 @@ | @@ -398,9 +398,6 @@ | ||
398 | <div class="log_three_select_one log_three_select_btn clear "> | 398 | <div class="log_three_select_one log_three_select_btn clear "> |
399 | 重置 | 399 | 重置 |
400 | </div> | 400 | </div> |
401 | - <!--<div class="log_three_select_one log_three_select_btn html2canvas">--> | ||
402 | - <!--生成图片--> | ||
403 | - <!--</div>--> | ||
404 | <input type="hidden" id="school" value=""/> | 401 | <input type="hidden" id="school" value=""/> |
405 | <input type="hidden" id="grade" value=""/> | 402 | <input type="hidden" id="grade" value=""/> |
406 | <input type="hidden" id="is_courier" value="1"/> | 403 | <input type="hidden" id="is_courier" value="1"/> |
@@ -416,10 +413,13 @@ | @@ -416,10 +413,13 @@ | ||
416 | </if> | 413 | </if> |
417 | </foreach> | 414 | </foreach> |
418 | <div class="shuju_zongshu">搜索结果为<span class="count">{:count($arr2)}</span>条</div> | 415 | <div class="shuju_zongshu">搜索结果为<span class="count">{:count($arr2)}</span>条</div> |
416 | +<div class="view_img" style="padding: 0 0.3rem"> | ||
417 | + <div class="log_three_select_one log_three_select_btn down" href="javascript:;" id="view_cavans">查看订单截图</div> | ||
418 | +</div> | ||
419 | <!-- 列表内容 --> | 419 | <!-- 列表内容 --> |
420 | -<div> | 420 | +<div id="orderlist" style="background: #fff;"> |
421 | <!--未发货--> | 421 | <!--未发货--> |
422 | - <div class="log_three_list_contant" style="display: block;background: rgba(359, 295, 265, 1)"> | 422 | + <div class="log_three_list_contant" style="display: block;"> |
423 | <foreach name="$data" item="vo"> | 423 | <foreach name="$data" item="vo"> |
424 | <if condition="$vo.state eq 2"> | 424 | <if condition="$vo.state eq 2"> |
425 | <php>$arr1[] = $vo;</php> | 425 | <php>$arr1[] = $vo;</php> |
@@ -711,6 +711,8 @@ | @@ -711,6 +711,8 @@ | ||
711 | <script src="__TMPL__/public/assets/js/mui.min.js"></script> | 711 | <script src="__TMPL__/public/assets/js/mui.min.js"></script> |
712 | <script src="__TMPL__/public/assets/js/mui.picker.min.js"></script> | 712 | <script src="__TMPL__/public/assets/js/mui.picker.min.js"></script> |
713 | <script src="__TMPL__/public/assets/js/city.data-3.js"></script> | 713 | <script src="__TMPL__/public/assets/js/city.data-3.js"></script> |
714 | +<script src="https://cdn.bootcss.com/html2canvas/0.5.0-beta4/html2canvas.js"></script> | ||
715 | +<script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script> | ||
714 | <script> | 716 | <script> |
715 | var expresspicker = new mui.PopPicker(); | 717 | var expresspicker = new mui.PopPicker(); |
716 | 718 | ||
@@ -852,6 +854,11 @@ | @@ -852,6 +854,11 @@ | ||
852 | var tabIndex = $(this).index(); | 854 | var tabIndex = $(this).index(); |
853 | $(this).addClass("log_three_tab_two").addClass("word_color").addClass('aaa').siblings().removeClass("log_three_tab_two").removeClass("word_color").removeClass("aaa"); | 855 | $(this).addClass("log_three_tab_two").addClass("word_color").addClass('aaa').siblings().removeClass("log_three_tab_two").removeClass("word_color").removeClass("aaa"); |
854 | $('.log_three_list_contant').eq(tabIndex).css('display', 'block').siblings().css('display', 'none'); | 856 | $('.log_three_list_contant').eq(tabIndex).css('display', 'block').siblings().css('display', 'none'); |
857 | + if(tabIndex == 0) { | ||
858 | + $('.view_img').css('display','block'); | ||
859 | + } else { | ||
860 | + $('.view_img').css('display','none'); | ||
861 | + } | ||
855 | search(); | 862 | search(); |
856 | $('.log_three_fixed_left_one img').attr('src', "__TMPL__/public/assets/images/fangkuang.png") | 863 | $('.log_three_fixed_left_one img').attr('src', "__TMPL__/public/assets/images/fangkuang.png") |
857 | }); | 864 | }); |
@@ -874,12 +881,10 @@ | @@ -874,12 +881,10 @@ | ||
874 | var length = $(".log_three_list_contant").eq(index).find('.log_three_list_top_lo img').length; | 881 | var length = $(".log_three_list_contant").eq(index).find('.log_three_list_top_lo img').length; |
875 | var l = 0; | 882 | var l = 0; |
876 | for (var n = 0; n < length; n++) { | 883 | for (var n = 0; n < length; n++) { |
877 | - console.log($(".log_three_list_contant").eq(index).find('.log_three_list_top_lo img').eq(n).attr('src')); | ||
878 | if ($(".log_three_list_contant").eq(index).find('.log_three_list_top_lo img').eq(n).attr('src') == "__TMPL__/public/assets/images/xuanzhong (1).png") { | 884 | if ($(".log_three_list_contant").eq(index).find('.log_three_list_top_lo img').eq(n).attr('src') == "__TMPL__/public/assets/images/xuanzhong (1).png") { |
879 | l++ | 885 | l++ |
880 | } | 886 | } |
881 | } | 887 | } |
882 | - console.log('@@@@@' + l + '@@@@@' + length); | ||
883 | if (l == length) { | 888 | if (l == length) { |
884 | $('.log_three_fixed_left_one img').attr('src', "__TMPL__/public/assets/images/xuanzhong (1).png") | 889 | $('.log_three_fixed_left_one img').attr('src', "__TMPL__/public/assets/images/xuanzhong (1).png") |
885 | } else { | 890 | } else { |
@@ -936,7 +941,6 @@ | @@ -936,7 +941,6 @@ | ||
936 | }); | 941 | }); |
937 | $(".tx_mask_kuaidi .get_Go").click(function () { | 942 | $(".tx_mask_kuaidi .get_Go").click(function () { |
938 | var index = $(this).index(); | 943 | var index = $(this).index(); |
939 | - console.log($(this).text()); | ||
940 | $(this).addClass('there_unActive').siblings().removeClass('there_unActive'); | 944 | $(this).addClass('there_unActive').siblings().removeClass('there_unActive'); |
941 | $('.get_Gofo').text($(this).text()).css("color", "#333"); | 945 | $('.get_Gofo').text($(this).text()).css("color", "#333"); |
942 | $(".tx_mask_kuaidi").hide(); | 946 | $(".tx_mask_kuaidi").hide(); |
@@ -984,7 +988,6 @@ | @@ -984,7 +988,6 @@ | ||
984 | var index = $('.log_three_tab_top div').index($('.aaa')); | 988 | var index = $('.log_three_tab_top div').index($('.aaa')); |
985 | if (data.code == 1) { | 989 | if (data.code == 1) { |
986 | var result = data.data; | 990 | var result = data.data; |
987 | - console.log("**********" + result.length); | ||
988 | if (result.length == 0) { | 991 | if (result.length == 0) { |
989 | var html = "<div style=\"text-align: center;width: 100%;height:100%;margin:0 auto;\">暂无数据</div>"; | 992 | var html = "<div style=\"text-align: center;width: 100%;height:100%;margin:0 auto;\">暂无数据</div>"; |
990 | } else { | 993 | } else { |
@@ -1113,7 +1116,6 @@ | @@ -1113,7 +1116,6 @@ | ||
1113 | " </div>\n" + indent_goods_html + "</a>" + | 1116 | " </div>\n" + indent_goods_html + "</a>" + |
1114 | "\t\t\t\t\t\t<div class=\"log_three_bottom_btn\">" + html_bottom + "</div></div>"; | 1117 | "\t\t\t\t\t\t<div class=\"log_three_bottom_btn\">" + html_bottom + "</div></div>"; |
1115 | } else if (result[i].is_courier == 2) { | 1118 | } else if (result[i].is_courier == 2) { |
1116 | - console.log("++"+html); | ||
1117 | html += "<div class=\"log_three_list order_" + result[i].id + "\">\n" + | 1119 | html += "<div class=\"log_three_list order_" + result[i].id + "\">\n" + |
1118 | "\t\t\t\t\t\t\t<div class=\"log_three_list_top\">\n" + | 1120 | "\t\t\t\t\t\t\t<div class=\"log_three_list_top\">\n" + |
1119 | "\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_left\">\n" + | 1121 | "\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_left\">\n" + |
@@ -1138,9 +1140,7 @@ | @@ -1138,9 +1140,7 @@ | ||
1138 | "\t\t\t\t\t\t<div class=\"log_three_bottom_btn\">" + html_bottom + "</div></div>"; | 1140 | "\t\t\t\t\t\t<div class=\"log_three_bottom_btn\">" + html_bottom + "</div></div>"; |
1139 | } | 1141 | } |
1140 | } | 1142 | } |
1141 | - console.log(html); | ||
1142 | $('.count').html(i); | 1143 | $('.count').html(i); |
1143 | - console.log('@@@@@@@@@@' + index); | ||
1144 | $('.log_three_list_contant').eq(index).html(html); | 1144 | $('.log_three_list_contant').eq(index).html(html); |
1145 | update(); | 1145 | update(); |
1146 | } else { | 1146 | } else { |
@@ -1208,7 +1208,6 @@ | @@ -1208,7 +1208,6 @@ | ||
1208 | var start_time = $('#start_time').val(); | 1208 | var start_time = $('#start_time').val(); |
1209 | // var end_time = $('#end_time').val(); | 1209 | // var end_time = $('#end_time').val(); |
1210 | var logistic_name = $('#logistic_name').val(); | 1210 | var logistic_name = $('#logistic_name').val(); |
1211 | - console.log(logistic_name); | ||
1212 | var logistic_code = $('#logistic_code').val(); | 1211 | var logistic_code = $('#logistic_code').val(); |
1213 | var indent_id = $(this).attr('data-indent-id'); | 1212 | var indent_id = $(this).attr('data-indent-id'); |
1214 | if (is_courier == 1) { | 1213 | if (is_courier == 1) { |
@@ -1327,9 +1326,7 @@ | @@ -1327,9 +1326,7 @@ | ||
1327 | 'indent_ids': indent_ids | 1326 | 'indent_ids': indent_ids |
1328 | }, | 1327 | }, |
1329 | success: function (res) { | 1328 | success: function (res) { |
1330 | - console.log(indent_ids); | ||
1331 | indent_ids = indent_ids.split(","); | 1329 | indent_ids = indent_ids.split(","); |
1332 | - console.log(indent_ids) | ||
1333 | if (res.code == 1) { | 1330 | if (res.code == 1) { |
1334 | $.each(indent_ids, function (key, indent_id) { | 1331 | $.each(indent_ids, function (key, indent_id) { |
1335 | $('.order_' + indent_id).remove(); | 1332 | $('.order_' + indent_id).remove(); |
@@ -1389,7 +1386,6 @@ | @@ -1389,7 +1386,6 @@ | ||
1389 | //统一配送选择时间 | 1386 | //统一配送选择时间 |
1390 | $(".tongyi_start_time").click(function () { | 1387 | $(".tongyi_start_time").click(function () { |
1391 | dtpicker.show(function (e) { | 1388 | dtpicker.show(function (e) { |
1392 | - console.log(e); | ||
1393 | $('.tongyi_start_time').text(e.text); | 1389 | $('.tongyi_start_time').text(e.text); |
1394 | $('#start_time').val(e.text); | 1390 | $('#start_time').val(e.text); |
1395 | $('.tongyi_start_time').css('color', '#333333'); | 1391 | $('.tongyi_start_time').css('color', '#333333'); |
@@ -1398,7 +1394,6 @@ | @@ -1398,7 +1394,6 @@ | ||
1398 | 1394 | ||
1399 | $(".tongyi_start_time2").click(function () { | 1395 | $(".tongyi_start_time2").click(function () { |
1400 | dtpicker.show(function (e) { | 1396 | dtpicker.show(function (e) { |
1401 | - console.log(e); | ||
1402 | $('.tongyi_start_time2').text(e.text); | 1397 | $('.tongyi_start_time2').text(e.text); |
1403 | $('#start_time2').val(e.text); | 1398 | $('#start_time2').val(e.text); |
1404 | $('.tongyi_start_time2').css('color', '#333333'); | 1399 | $('.tongyi_start_time2').css('color', '#333333'); |
@@ -1409,50 +1404,45 @@ | @@ -1409,50 +1404,45 @@ | ||
1409 | window.event ? (window.event.cancelBubble = true) : e.stopPropagation(); | 1404 | window.event ? (window.event.cancelBubble = true) : e.stopPropagation(); |
1410 | } | 1405 | } |
1411 | </script> | 1406 | </script> |
1412 | -<script src="https://cdn.bootcss.com/html2canvas/0.5.0-beta4/html2canvas.js"></script> | ||
1413 | <script> | 1407 | <script> |
1414 | - $(".html2canvas").click(function () { | ||
1415 | - // html2canvas($(".log_three_list_contant")).then(function (canvas) { | ||
1416 | - // var imgUri = canvas.toDataURL("image/png").replace("image/png", "image/octet-stream"); // 获取生成的图片的url | ||
1417 | - // window.location.href = imgUri; // 下载图片 | ||
1418 | - // }); | ||
1419 | - | ||
1420 | -alert(132); | ||
1421 | - html2canvas($('.log_three_list_contant'), { | ||
1422 | - onrendered: function (canvas) { | ||
1423 | - var data = canvas.toDataURL("image/jpg","image/octet-stream");//生成的格式 | ||
1424 | - //data就是生成的base64码啦 | ||
1425 | - console.log(data); | ||
1426 | - downloadFile('ceshi.png',data); | ||
1427 | - } | 1408 | + var img_url = ''; |
1409 | + var k= $("#orderlist").offset().top; | ||
1410 | + var canvas2 = document.createElement("canvas"); | ||
1411 | + let | ||
1412 | + _canvas = document.querySelector('#orderlist'); | ||
1413 | + var w = parseInt(window.getComputedStyle(_canvas).width); | ||
1414 | + var h = parseInt(window.getComputedStyle(_canvas).height); | ||
1415 | + //将canvas画布放大若干倍,然后盛放在较小的容器内,就显得不模糊了 | ||
1416 | + canvas2.width = w * 2; | ||
1417 | + canvas2.height = (h + 400) * 2; | ||
1418 | + canvas2.style.width = w + "px"; | ||
1419 | + canvas2.style.height = h + "px"; | ||
1420 | + //可以按照自己的需求,对context的参数修改,translate指的是偏移量 | ||
1421 | + // var context = canvas.getContext("2d"); | ||
1422 | + // context.translate(0,0); | ||
1423 | + var context = canvas2.getContext("2d"); | ||
1424 | + context.scale(2, 2); | ||
1425 | + html2canvas(document.querySelector('#orderlist'), { canvas: canvas2 }).then(function(canvas) { | ||
1426 | + //document.body.appendChild(canvas); | ||
1427 | + //canvas转换成url,然后利用a标签的download属性,直接下载,绕过上传服务器再下载 | ||
1428 | + $.ajax({ | ||
1429 | + type: 'POST', | ||
1430 | + url: "{:url('upload_img')}", | ||
1431 | + data: {img:canvas.toDataURL(),top:k}, | ||
1432 | + dataType: 'json', | ||
1433 | + success: function (res) { | ||
1434 | + img_url = res.data | ||
1435 | + } | ||
1428 | }); | 1436 | }); |
1437 | + // document.querySelector(".down").setAttribute('href', canvas.toDataURL()); | ||
1429 | }); | 1438 | }); |
1430 | - function downloadFile(fileName, content) { | ||
1431 | - let aLink = document.createElement('a'); | ||
1432 | - let blob = this.base64ToBlob(content); //new Blob([content]); | ||
1433 | - | ||
1434 | - let evt = document.createEvent("HTMLEvents"); | ||
1435 | - evt.initEvent("click", true, true);//initEvent 不加后两个参数在FF下会报错 事件类型,是否冒泡,是否阻止浏览器的默认行为 | ||
1436 | - aLink.download = fileName; | ||
1437 | - aLink.href = URL.createObjectURL(blob); | ||
1438 | - | ||
1439 | - // aLink.dispatchEvent(evt); | ||
1440 | - aLink.click() | ||
1441 | - } | ||
1442 | - //base64转blob | ||
1443 | - function base64ToBlob(code) { | ||
1444 | - let parts = code.split(';base64,'); | ||
1445 | - let contentType = parts[0].split(':')[1]; | ||
1446 | - let raw = window.atob(parts[1]); | ||
1447 | - let rawLength = raw.length; | ||
1448 | - | ||
1449 | - let uInt8Array = new Uint8Array(rawLength); | 1439 | + $('#view_cavans').click(function(){ |
1440 | + wx.previewImage({ | ||
1441 | + current: img_url, // 当前显示图片的http链接 | ||
1442 | + urls: [img_url] // 需要预览的图片http链接列表 | ||
1443 | + }); | ||
1444 | + }) | ||
1450 | 1445 | ||
1451 | - for (let i = 0; i < rawLength; ++i) { | ||
1452 | - uInt8Array[i] = raw.charCodeAt(i); | ||
1453 | - } | ||
1454 | - return new Blob([uInt8Array], {type: contentType}); | ||
1455 | - } | ||
1456 | </script> | 1446 | </script> |
1457 | </body> | 1447 | </body> |
1458 | 1448 |
1 | +<!DOCTYPE html> | ||
2 | +<html lang="en"> | ||
3 | + | ||
4 | +<head> | ||
5 | + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/> | ||
6 | + <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/> | ||
7 | + <meta http-equiv="X-UA-Compatible" content="ie=edge"/> | ||
8 | + <title>学考无忧-订单管理</title> | ||
9 | + <link rel="stylesheet" href="__TMPL__/public/assets/css/mui.min.css"/> | ||
10 | + <link rel="stylesheet" href="__TMPL__/public/assets/css/mui.picker.min.css"/> | ||
11 | + <link rel="stylesheet" href="__TMPL__/public/assets/css/reset.css"/> | ||
12 | + <link rel="stylesheet" href="__TMPL__/public/assets/css/log.css"/> | ||
13 | + <style> | ||
14 | + .tx_masktwo { | ||
15 | + display: none; | ||
16 | + z-index: 2; | ||
17 | + width: 100%; | ||
18 | + height: 100%; | ||
19 | + position: fixed; | ||
20 | + background-color: rgba(0, 0, 0, 0.5); | ||
21 | + } | ||
22 | + | ||
23 | + .take_one { | ||
24 | + margin-top: 0.3rem; | ||
25 | + width: 1.6rem; | ||
26 | + height: 0.48rem; | ||
27 | + background: linear-gradient(328deg, rgba(255, 78, 0, 1) 0%, rgba(255, 157, 45, 1) 100%); | ||
28 | + box-shadow: 0 0.06rem 0.12rem rgba(255, 128, 0, 0.24); | ||
29 | + opacity: 1; | ||
30 | + border-radius: 0.08rem; | ||
31 | + display: flex; | ||
32 | + justify-content: center; | ||
33 | + align-items: center; | ||
34 | + font-size: 0.26rem; | ||
35 | + font-weight: 400; | ||
36 | + color: rgba(255, 255, 255, 1); | ||
37 | + } | ||
38 | + | ||
39 | + .tx_mask_class { | ||
40 | + display: none; | ||
41 | + z-index: 3; | ||
42 | + width: 100%; | ||
43 | + height: 100%; | ||
44 | + position: fixed; | ||
45 | + background-color: rgba(0, 0, 0, 0.5); | ||
46 | + } | ||
47 | + | ||
48 | + .tx_maskCon_class { | ||
49 | + width: 100%; | ||
50 | + height: 5.16rem; | ||
51 | + background: #fff; | ||
52 | + position: fixed; | ||
53 | + bottom: 0; | ||
54 | + } | ||
55 | + | ||
56 | + .three_model_class_name { | ||
57 | + height: 0.36rem; | ||
58 | + margin: 0.08rem; | ||
59 | + font-size: 0.24rem; | ||
60 | + font-weight: 400; | ||
61 | + color: #666666; | ||
62 | + opacity: 1; | ||
63 | + padding: 0.2rem 0; | ||
64 | + line-height: 0; | ||
65 | + border-left: none; | ||
66 | + border-right: none | ||
67 | + } | ||
68 | + | ||
69 | + .get_Go { | ||
70 | + height: 0.36rem; | ||
71 | + margin: 0.08rem; | ||
72 | + font-size: 0.24rem; | ||
73 | + font-weight: 400; | ||
74 | + cursor: pointer; | ||
75 | + color: #666666; | ||
76 | + opacity: 1; | ||
77 | + padding: 0.2rem 0; | ||
78 | + line-height: 0; | ||
79 | + border-left: none; | ||
80 | + border-right: none; | ||
81 | + } | ||
82 | + | ||
83 | + .mui-poppicker-header, | ||
84 | + .mui-picker { | ||
85 | + background-color: white; | ||
86 | + } | ||
87 | + | ||
88 | + .mui-btn-blue, | ||
89 | + .mui-btn-primary, | ||
90 | + input[type=submit] { | ||
91 | + background-color: #FF7700; | ||
92 | + border: 0; | ||
93 | + } | ||
94 | + | ||
95 | + .mui-pciker-list li.highlight { | ||
96 | + color: #FF7700; | ||
97 | + } | ||
98 | + | ||
99 | + .mui-dtpicker-header, .mui-dtpicker-title h5 { | ||
100 | + background-color: white; | ||
101 | + } | ||
102 | + | ||
103 | + .dingdan_lianxi_ren { | ||
104 | + font-size: 0.28rem; | ||
105 | + cursor: pointer; | ||
106 | + font-family: PingFang SC; | ||
107 | + font-weight: 400; | ||
108 | + color: rgba(102, 102, 102, 1); | ||
109 | + opacity: 1; | ||
110 | + } | ||
111 | + | ||
112 | + /*.dingdan_detail {*/ | ||
113 | + /*padding-top: 0.22rem;*/ | ||
114 | + /*}*/ | ||
115 | + | ||
116 | + .dingdan_detail_hao { | ||
117 | + font-size: 0.28rem; | ||
118 | + cursor: pointer; | ||
119 | + font-family: PingFang SC; | ||
120 | + font-weight: 400; | ||
121 | + color: rgba(102, 102, 102, 1); | ||
122 | + opacity: 1; | ||
123 | + margin-top: 0.2rem; | ||
124 | + } | ||
125 | + | ||
126 | + .right_dingdan { | ||
127 | + width: 5.6rem; | ||
128 | + margin-left: 0.2rem; | ||
129 | + } | ||
130 | + | ||
131 | + .right_dingdan_top { | ||
132 | + display: flex; | ||
133 | + justify-content: space-between; | ||
134 | + display: -webkit-box; /* Chrome 4+, Safari 3.1, iOS Safari 3.2+ */ | ||
135 | + display: -moz-box; /* Firefox 17- */ | ||
136 | + display: -webkit-flex; /* Chrome 21+, Safari 6.1+, iOS Safari 7+, Opera 15/16 */ | ||
137 | + display: -moz-flex; /* Firefox 18+ */ | ||
138 | + display: -ms-flexbox; /* IE 10 */ | ||
139 | + display: flex; /* Chrome 29+, Firefox 22+, IE 11+, Opera 12.1/17/18, Android 4.4+ */ | ||
140 | + justify-content: space-between; | ||
141 | + -webkit-flex-justify-content: space-between; | ||
142 | + -moz-box-justify-content: space-between; | ||
143 | + -ms-flexbox-justify-content: space-between; | ||
144 | + -webkit-flexalign-align-items: center; | ||
145 | + -moz-box-align-items: center; | ||
146 | + -ms-flexbox-align-items: center; | ||
147 | + } | ||
148 | + | ||
149 | + .right_dingdan_center { | ||
150 | + text-align: right; | ||
151 | + } | ||
152 | + | ||
153 | + .right_dingdan_one { | ||
154 | + font-size: 0.26rem; | ||
155 | + cursor: pointer; | ||
156 | + font-weight: 400; | ||
157 | + color: rgba(51, 51, 51, 1); | ||
158 | + opacity: 1; | ||
159 | + } | ||
160 | + | ||
161 | + .right_dingdan_two { | ||
162 | + font-size: 0.34rem; | ||
163 | + font-weight: 400; | ||
164 | + cursor: pointer; | ||
165 | + line-height: 25px; | ||
166 | + color: rgba(51, 51, 51, 1); | ||
167 | + opacity: 1; | ||
168 | + } | ||
169 | + | ||
170 | + .shuju_zongshu { | ||
171 | + padding-left: 0.4rem; | ||
172 | + font-size: 0.28rem; | ||
173 | + font-weight: 600; | ||
174 | + color: #333; | ||
175 | + border-radius: 0.08rem; | ||
176 | + } | ||
177 | + | ||
178 | + .log_three_bottom2 { | ||
179 | + margin-top: 0.3rem; | ||
180 | + cursor: pointer; | ||
181 | + width: 1.6rem; | ||
182 | + height: 0.48rem; | ||
183 | + background: linear-gradient(328deg, rgba(255, 78, 0, 1) 0%, rgba(255, 157, 45, 1) 100%); | ||
184 | + box-shadow: 0 0.06rem 0.12rem rgba(255, 128, 0, 0.24); | ||
185 | + opacity: 1; | ||
186 | + border-radius: 0.08rem; | ||
187 | + display: flex; | ||
188 | + justify-content: center; | ||
189 | + align-items: center; | ||
190 | + font-size: 0.26rem; | ||
191 | + font-weight: 400; | ||
192 | + color: rgba(255, 255, 255, 1); | ||
193 | + } | ||
194 | + </style> | ||
195 | +</head> | ||
196 | + | ||
197 | +<body style="cursor:pointer;background: #fff"> | ||
198 | + | ||
199 | + | ||
200 | +<!--学校弹窗--> | ||
201 | +<div class="tx_mask_school" onclick="$(this).hide()"> | ||
202 | + <div class="tx_maskCon_school" onclick="zZFun(this)"> | ||
203 | + <div class="three_model_school"> | ||
204 | + <div class="three_model_school_title"> | ||
205 | + 选择学校 | ||
206 | + </div> | ||
207 | + <div class="three_model_school_data there_university" style="display: block;"> | ||
208 | + | ||
209 | + </div> | ||
210 | + </div> | ||
211 | + </div> | ||
212 | +</div> | ||
213 | +<!--班级弹窗--> | ||
214 | +<div class="tx_mask_class" onclick="$(this).hide()"> | ||
215 | + <div class="tx_maskCon_class" onclick="zZFun(this)"> | ||
216 | + <div class="three_model_school"> | ||
217 | + <div class="three_model_school_title"> | ||
218 | + 选择班级 | ||
219 | + </div> | ||
220 | + <div class="three_model_school_data there_university grade" style="display: block;"> | ||
221 | + </div> | ||
222 | + </div> | ||
223 | + </div> | ||
224 | +</div> | ||
225 | + | ||
226 | + | ||
227 | +<!--统一配送--> | ||
228 | +<!--<div class="tx_mask_tongyi" onclick="$(this).hide()">--> | ||
229 | +<!--<div class="tx_maskCon_tongyi" onclick="zZFun(this)">--> | ||
230 | +<!--<div class="three_model_school">--> | ||
231 | +<!--<div class="three_model_school_data" style="display: block;">--> | ||
232 | +<!--<div class="three_modal_kuaidi_name there_unActive" data-id="1">统一配送</div>--> | ||
233 | +<!--<div class="three_modal_kuaidi_name" data-id="2">快递配送</div>--> | ||
234 | +<!--</div>--> | ||
235 | +<!--</div>--> | ||
236 | +<!--</div>--> | ||
237 | +<!--</div>--> | ||
238 | +<!--选择快递--> | ||
239 | +<!--<div class="tx_mask_kuaidi" onclick="$(this).hide()">--> | ||
240 | +<!--<div class="tx_maskCon_school" onclick="zZFun(this)">--> | ||
241 | +<!--<div class="three_model_school">--> | ||
242 | +<!--<div class="three_model_school_title">--> | ||
243 | +<!--选择快递--> | ||
244 | +<!--</div>--> | ||
245 | +<!--<div>--> | ||
246 | +<!--<div class="three_model_school_data" style="display: block;">--> | ||
247 | +<!--<div class="get_Go" data-name="SF">顺丰快递</div>--> | ||
248 | +<!--<div class="get_Go" data-name="YTO">圆通快递</div>--> | ||
249 | +<!--<div class="get_Go" data-name="ZTO">中通快递</div>--> | ||
250 | +<!--<div class="get_Go there_unActive" data-name="STO">申通快递</div>--> | ||
251 | +<!--<div class="get_Go" data-name="YD">韵达快递</div>--> | ||
252 | +<!--<div class="get_Go" data-name="HHTT">天天快递</div>--> | ||
253 | +<!--<div class="get_Go" data-name="HTKY">百世快递</div>--> | ||
254 | +<!--<div class="get_Go" data-name="YZPY">邮政快递包裹</div>--> | ||
255 | +<!--<div class="get_Go" data-name="EMS">EMS</div>--> | ||
256 | +<!--<div class="get_Go" data-name="DBL">德邦快递</div>--> | ||
257 | +<!--<div class="get_Go" data-name="ZJS">宅急送</div>--> | ||
258 | +<!--<div class="get_Go" data-name="TNT">TNT快递</div>--> | ||
259 | +<!--</div>--> | ||
260 | +<!--</div>--> | ||
261 | +<!--</div>--> | ||
262 | +<!--</div>--> | ||
263 | +<!--</div>--> | ||
264 | +<div class="tx_masktwo" style="display: none;" onclick="$(this).hide()"> | ||
265 | + <div class="tx_maskCon" onclick="zZFun(this)"> | ||
266 | + <div class="tx_maskConImg"> | ||
267 | + <img src="__TMPL__/public/assets/images/91.png" alt=""/> | ||
268 | + </div> | ||
269 | + <div class="tx_maskCon2"> | ||
270 | + <div class="log_three_model"> | ||
271 | + <div class="log_three_model_one time"> | ||
272 | + <div class="log_three_model_left">配送时间</div> | ||
273 | + <div class="log_psong tongyi_start_time2" style="color: #CCCCCC;"> | ||
274 | + 请选择配送到达时间 | ||
275 | + </div> | ||
276 | + <input type="hidden" id="start_time2" value="" placeholder="请输入开配送时间"/> | ||
277 | + </div> | ||
278 | + <!--<div class="log_three_model_one time">--> | ||
279 | + <!--<div class="log_three_model_left">配送时间</div>--> | ||
280 | + <!--<div class="log_psong">--> | ||
281 | + <!--<input type="text" id="end_time2" value="" placeholder="请输入结束配送时间"/>--> | ||
282 | + <!--</div>--> | ||
283 | + <!--</div>--> | ||
284 | + </div> | ||
285 | + <!-- 确定 --> | ||
286 | + <div class="tx_maskOk confirm2" data-is_courier="" data-id="" data-indent-id="">确定</div> | ||
287 | + </div> | ||
288 | + </div> | ||
289 | +</div> | ||
290 | +<div class="tx_maskone" onclick="$(this).hide()"> | ||
291 | + <div class="tx_maskCon" onclick="zZFun(this)"> | ||
292 | + <div class="tx_maskConImg"> | ||
293 | + <img src="__TMPL__/public/assets/images/91.png" alt=""/> | ||
294 | + </div> | ||
295 | + <div class="tx_maskCon2"> | ||
296 | + <div class="log_three_model"> | ||
297 | + <div class="log_three_model_one time"> | ||
298 | + <div class="log_three_model_left">配送时间</div> | ||
299 | + <div class="log_psong tongyi_start_time" style="color: #CCCCCC;"> | ||
300 | + 请选择配送到达时间 | ||
301 | + </div> | ||
302 | + <input type="hidden" id="start_time" value="" placeholder="请输入开配送时间"/> | ||
303 | + </div> | ||
304 | + <!--<div class="log_three_model_one time"> | ||
305 | + <div class="log_three_model_left">配送时间</div> | ||
306 | + <div class="log_psong"> | ||
307 | + <input type="text" id="end_time" value="" placeholder="请输入结束配送时间"/> | ||
308 | + </div> | ||
309 | + </div>--> | ||
310 | + <!--<div class="log_three_model_one logistic">--> | ||
311 | + <!--<div class="log_three_model_left">选择快递</div>--> | ||
312 | + <!--<div class="log_psong log_psong_select">--> | ||
313 | + <!--<div class="log_ps_title2 get_Gofo">请选择快递公司</div>--> | ||
314 | + <!--<div class="log_ps_img">--> | ||
315 | + <!--<img src="__TMPL__/public/assets/images/29.png"/>--> | ||
316 | + <input type="hidden" id="logistic_name" value="" placeholder="请选择快递公司"/> | ||
317 | + <!--</div>--> | ||
318 | + <!--</div>--> | ||
319 | + <!--</div>--> | ||
320 | + <div class="log_three_model_one excompany logistic"> | ||
321 | + <div class="log_three_model_left">选择快递</div> | ||
322 | + <div class="log_psong log_psong_select"> | ||
323 | + <div class="log_ps_title excompany_word">请选择</div> | ||
324 | + <div class="log_ps_img"> | ||
325 | + <img src="__TMPL__/public/assets/images/29.png"/> | ||
326 | + </div> | ||
327 | + </div> | ||
328 | + </div> | ||
329 | + <div class="log_three_model_one logistic" style="padding-bottom: 0;"> | ||
330 | + <div class="log_three_model_left" style="margin-top: -0.3rem;">快递单号</div> | ||
331 | + <div class="log_three_model_right"> | ||
332 | + <input type="text" id="logistic_code" placeholder="请输入快递单号"/> | ||
333 | + </div> | ||
334 | + </div> | ||
335 | + </div> | ||
336 | + <!-- 确定 --> | ||
337 | + <div class="tx_maskOk confirm" data-is_courier="" data-id="" data-indent-id="">确定</div> | ||
338 | + </div> | ||
339 | + </div> | ||
340 | +</div> | ||
341 | +<div class="log_top_co"> | ||
342 | + <!-- 顶部 --> | ||
343 | + <div class=" order_top log_top_co order_tops"> | ||
344 | + <a href="javascript:history.back(-1)"> | ||
345 | + <img src="__TMPL__/public/assets/images/left.png" alt=""/> | ||
346 | + </a> | ||
347 | + <p>订单管理</p> | ||
348 | + </div> | ||
349 | +</div> | ||
350 | +<!-- tab切换 --> | ||
351 | +<div class="log_three_tab log_three_tab_top"> | ||
352 | + <div class="log_three_tab_one log_three_tab_two word_color aaa" data-state="2" style="cursor: pointer">未发货</div> | ||
353 | + <div class="log_three_tab_one" data-state="5" style="cursor: pointer">已发货</div> | ||
354 | + <div class="log_three_tab_one" data-state="3" style="cursor: pointer">已完成</div> | ||
355 | +</div> | ||
356 | +<!-- 下拉框 --> | ||
357 | +<div class="log_three_select"> | ||
358 | + <!-- <div class="log_three_select_one log_three_select_school" style="cursor: pointer"> | ||
359 | + <div class="log_three_select_title log_three_select_school2"> | ||
360 | + 请选择学校/班级 | ||
361 | + </div> | ||
362 | + <div class="log_three_select_img"> | ||
363 | + <img src="__TMPL__/public/assets/images/75.png" alt=""/> | ||
364 | + </div> | ||
365 | + </div>--> | ||
366 | + | ||
367 | + | ||
368 | + <div class="log_three_select_one log_three_select_school2"> | ||
369 | + <div class="log_three_select_title schools_word"> | ||
370 | + 请选择学校 | ||
371 | + </div> | ||
372 | + <!--<div class="log_three_select_img">--> | ||
373 | + <!--<img src="__TMPL__/public/assets/images/75.png" alt="" />--> | ||
374 | + <!--</div>--> | ||
375 | + </div> | ||
376 | + <div class="log_three_select_one log_three_select_class2"> | ||
377 | + <div class="log_three_select_title class_word"> | ||
378 | + 请选择班级 | ||
379 | + </div> | ||
380 | + <!--<div class="log_three_select_img">--> | ||
381 | + <!--<img src="__TMPL__/public/assets/images/75.png" alt="" />--> | ||
382 | + <!--</div>--> | ||
383 | + </div> | ||
384 | + | ||
385 | + | ||
386 | + <div class="log_three_select_one log_three_select_peisong log_three_select_tongyi" style="cursor: pointer"> | ||
387 | + <!--<div class="log_three_select_title log_three_select_contant">--> | ||
388 | + <!--统一配送--> | ||
389 | + <!--</div>--> | ||
390 | + <div class="log_three_select_title express_word">请选择配送方式</div> | ||
391 | + <!--<div class="log_three_select_img">--> | ||
392 | + <!--<img src="__TMPL__/public/assets/images/75.png" alt=""/>--> | ||
393 | + <!--</div>--> | ||
394 | + </div> | ||
395 | + <div class="log_three_select_one log_three_select_btn search"> | ||
396 | + 搜索 | ||
397 | + </div> | ||
398 | + <div class="log_three_select_one log_three_select_btn clear "> | ||
399 | + 重置 | ||
400 | + </div> | ||
401 | + <!--<div class="log_three_select_one log_three_select_btn html2canvas">--> | ||
402 | + <!--生成图片--> | ||
403 | + <!--</div>--> | ||
404 | + <input type="hidden" id="school" value=""/> | ||
405 | + <input type="hidden" id="grade" value=""/> | ||
406 | + <input type="hidden" id="is_courier" value="1"/> | ||
407 | +</div> | ||
408 | +<php>$arr2 = [];</php> | ||
409 | +<foreach name="$data" item="vo"> | ||
410 | + <if condition="$vo.state eq 2"> | ||
411 | + <php>$arr2[] = $vo;</php> | ||
412 | + <elseif condition="$vo.state eq 5"/> | ||
413 | + <php>$arr5[] = $vo;</php> | ||
414 | + <elseif condition="$vo.state eq 3"/> | ||
415 | + <php>$arr3[] = $vo;</php> | ||
416 | + </if> | ||
417 | +</foreach> | ||
418 | +<div class="shuju_zongshu">搜索结果为<span class="count">{:count($arr2)}</span>条</div> | ||
419 | +<!-- 列表内容 --> | ||
420 | +<div> | ||
421 | + <!--未发货--> | ||
422 | + <div class="log_three_list_contant" style="display: block;background: rgba(359, 295, 265, 1)"> | ||
423 | + <foreach name="$data" item="vo"> | ||
424 | + <if condition="$vo.state eq 2"> | ||
425 | + <php>$arr1[] = $vo;</php> | ||
426 | + <div class="log_three_list order_{$vo.id}"> | ||
427 | + <div class="log_three_list_top"> | ||
428 | + <div class="log_three_list_top_left"> | ||
429 | + <if condition="$vo.is_courier eq 1"> | ||
430 | + <div class="log_three_list_top_lo"> | ||
431 | + <img src="__TMPL__/public/assets/images/fangkuang.png" | ||
432 | + data-indent-id="{$vo['id']}" alt=""/> | ||
433 | + </div> | ||
434 | + </if> | ||
435 | + <div class="log_three_list_top_lt"> | ||
436 | + <div class="log_three_zhongbiao"> | ||
437 | + <img src="__TMPL__/public/assets/images/52.png" alt=""/> | ||
438 | + </div> | ||
439 | + <div class="log_three_shijian"> | ||
440 | + {$vo['pay_time']} | ||
441 | + </div> | ||
442 | + </div> | ||
443 | + </div> | ||
444 | + <div class="log_three_list_top_right"> | ||
445 | + <if condition="$vo.state eq 2"> | ||
446 | + 待发货 | ||
447 | + <elseif condition="$vo.state eq 5"/> | ||
448 | + 已发货 | ||
449 | + <elseif condition="$vo.state eq 3"/> | ||
450 | + 已完成 | ||
451 | + </if> | ||
452 | + </div> | ||
453 | + </div> | ||
454 | + <a href="{:url('get_one',array('id'=>$vo['id']))}"> | ||
455 | + <div class="dingdan_detail_top"> | ||
456 | + <div class="dingdan_detail_hao">订单号:{$vo.order_number}</div> | ||
457 | + </div> | ||
458 | + <foreach name="$vo.indent_goods" item="i_g"> | ||
459 | + <div class="dingdan_detail"> | ||
460 | + <div class="log_three_list_center" style="display: flex;justify-content: flex-start;"> | ||
461 | + <div class="log_three_list_center_left" style="width: 1.44rem;height:1.44rem"> | ||
462 | + <img src="{:cmf_get_image_url($i_g.thumbnail)}" alt="" | ||
463 | + style="width: 100%;height: 100%;"/> | ||
464 | + </div> | ||
465 | + <!--<div class="log_three_list_center_right" style="margin-left: 0.16rem;width: 5.6rem">--> | ||
466 | + <!--<div class="log_three_center_one">--> | ||
467 | + <!--{$i_g.book_name}--> | ||
468 | + <!--</div>--> | ||
469 | + <!--<div class="right_dingdan_money">--> | ||
470 | + <!--<div class="log_three_center_three"><span>¥</span>{$i_g.price}</div>--> | ||
471 | + <!--<div class="log_three_center_two">×{$i_g.number}</div>--> | ||
472 | + <!--</div>--> | ||
473 | + <!--</div>--> | ||
474 | + <div class="right_dingdan"> | ||
475 | + <div class="right_dingdan_top"> | ||
476 | + <div class="right_dingdan_one">{$i_g.book_name}</div> | ||
477 | + <div class="right_dingdan_two">¥{$i_g.price}</div> | ||
478 | + </div> | ||
479 | + <div class="right_dingdan_center"> | ||
480 | + <div class="right_dindan_three right_dingdan_one">x{$i_g.number}</div> | ||
481 | + </div> | ||
482 | + | ||
483 | + <div class="right_dingdan_four right_dingdan_one">{$vo.school} {$vo.grade} | ||
484 | + {$vo.class} | ||
485 | + </div> | ||
486 | + <div class="right_dingdan_four right_dingdan_one" style="margin-top: -0.05rem;"> | ||
487 | + {$vo.name} {$vo.phone} | ||
488 | + </div> | ||
489 | + </div> | ||
490 | + </div> | ||
491 | + </div> | ||
492 | + </foreach> | ||
493 | + </a> | ||
494 | + <!-- 立即发货 --> | ||
495 | + <div class="log_three_bottom_btn"> | ||
496 | + <if condition="$vo.state eq 2"> | ||
497 | + <div class="log_three_bottom send" data-indent-id="{$vo.id}" | ||
498 | + data-is_courier="{$vo.is_courier}"> | ||
499 | + 立即发货 | ||
500 | + </div> | ||
501 | + <elseif condition="$vo.state eq 5"/> | ||
502 | + <if condition="$vo.is_courier eq 2"> | ||
503 | + <a href="{:url('logistics/index',array('indent_id'=>$vo['id']))}"> | ||
504 | + <div class="log_three_bottom2" data-indent-id="{$vo.id}"> | ||
505 | + 查看物流 | ||
506 | + </div> | ||
507 | + </a> | ||
508 | + <div class="log_three_bottom" data-indent-id="{$vo.id}"> | ||
509 | + 完成 | ||
510 | + </div> | ||
511 | + </if> | ||
512 | + <elseif condition="$vo.state eq 3"/> | ||
513 | + <!--<div class="log_three_bottom" data-indent-id="{$vo.id}">--> | ||
514 | + <!--已完成啦--> | ||
515 | + <!--</div>--> | ||
516 | + </if> | ||
517 | + </div> | ||
518 | + </div> | ||
519 | + </if> | ||
520 | + </foreach> | ||
521 | + <empty name="$arr1"> | ||
522 | + <div style="text-align: center;width: 100%;height:100%;margin:0 auto;">暂无数据</div> | ||
523 | + </empty> | ||
524 | + </div> | ||
525 | + | ||
526 | + <!--已发货--> | ||
527 | + <div class="log_three_list_contant"> | ||
528 | + <foreach name="$data" item="vo"> | ||
529 | + <if condition="$vo.state eq 5"> | ||
530 | + <php>$arr2[] = $vo;</php> | ||
531 | + <div class="log_three_list order_{$vo.id}"> | ||
532 | + <div class="log_three_list_top"> | ||
533 | + <div class="log_three_list_top_left"> | ||
534 | + <if condition="$vo.is_courier eq 1"> | ||
535 | + <div class="log_three_list_top_lo"> | ||
536 | + <img src="__TMPL__/public/assets/images/fangkuang.png" | ||
537 | + data-indent-id="{$vo['id']}" alt=""/> | ||
538 | + </div> | ||
539 | + </if> | ||
540 | + <div class="log_three_list_top_lt"> | ||
541 | + <div class="log_three_zhongbiao"> | ||
542 | + <img src="__TMPL__/public/assets/images/52.png" alt=""/> | ||
543 | + </div> | ||
544 | + <div class="log_three_shijian"> | ||
545 | + {$vo['pay_time']} | ||
546 | + </div> | ||
547 | + </div> | ||
548 | + </div> | ||
549 | + <div class="log_three_list_top_right"> | ||
550 | + <if condition="$vo.state eq 2"> | ||
551 | + 代发货 | ||
552 | + <elseif condition="$vo.state eq 5"/> | ||
553 | + 已发货 | ||
554 | + <elseif condition="$vo.state eq 3"/> | ||
555 | + 已完成 | ||
556 | + </if> | ||
557 | + </div> | ||
558 | + </div> | ||
559 | + <a href="{:url('get_one',array('id'=>$vo['id']))}"> | ||
560 | + <foreach name="$vo.indent_goods" item="i_g"> | ||
561 | + <div class="log_three_list_center" style="display: flex;justify-content: flex-start;"> | ||
562 | + <div class="log_three_list_center_left" style="width: 1.44rem;height:1.44rem"> | ||
563 | + <img src="{:cmf_get_image_url($i_g.thumbnail)}" alt="" | ||
564 | + style="width: 100%;height: 100%;"/> | ||
565 | + </div> | ||
566 | + <div class="log_three_list_center_right" style="margin-left: 0.16rem;"> | ||
567 | + <div class="log_three_center_one"> | ||
568 | + {$i_g.book_name} | ||
569 | + </div> | ||
570 | + <div class="log_three_center_two">×{$i_g.number}</div> | ||
571 | + <div class="log_three_center_three"><span>¥</span>{$i_g.price}</div> | ||
572 | + </div> | ||
573 | + </div> | ||
574 | + </foreach> | ||
575 | + </a> | ||
576 | + <!-- 立即发货 --> | ||
577 | + <div class="log_three_bottom_btn"> | ||
578 | + <if condition="$vo.state eq 2"> | ||
579 | + <div class="log_three_bottom" data-indent-id="{$vo.id}" data-is_courier="{$vo.is_courier}"> | ||
580 | + 立即发货 | ||
581 | + </div> | ||
582 | + <elseif condition="$vo.state eq 5"/> | ||
583 | + <if condition="$vo.is_courier eq 2"> | ||
584 | + <a href="{:url('logistics/index',array('indent_id'=>$vo['id']))}"> | ||
585 | + <div class="log_three_bottom" data-indent-id="{$vo.id}"> | ||
586 | + 查看物流 | ||
587 | + </div> | ||
588 | + </a> | ||
589 | + <else/> | ||
590 | + <a href="{:url('logistics/index',array('indent_id'=>$vo['id']))}"> | ||
591 | + <div class="log_three_bottom2" data-indent-id="{$vo.id}"> | ||
592 | + 查看物流 | ||
593 | + </div> | ||
594 | + </a> | ||
595 | + <div class="take_one" data-indent-id="{$vo.id}"> | ||
596 | + 完成 | ||
597 | + </div> | ||
598 | + </if> | ||
599 | + <elseif condition="$vo.state eq 3"/> | ||
600 | + <!--<div class="log_three_bottom" data-indent-id="{$vo.id}">--> | ||
601 | + <!--已完成啦--> | ||
602 | + <!--</div>--> | ||
603 | + </if> | ||
604 | + </div> | ||
605 | + </div> | ||
606 | + </if> | ||
607 | + </foreach> | ||
608 | + <empty name="$arr2"> | ||
609 | + <div style="text-align: center;width: 100%;height:100%;margin:0 auto;">暂无数据</div> | ||
610 | + </empty> | ||
611 | + </div> | ||
612 | + <!--已完成--> | ||
613 | + <div class="log_three_list_contant"> | ||
614 | + <foreach name="$data" item="vo"> | ||
615 | + <if condition="$vo.state eq 3"> | ||
616 | + <php>$arr3 = $vo;</php> | ||
617 | + <div class="log_three_list order_{$vo.id}"> | ||
618 | + <div class="log_three_list_top"> | ||
619 | + <div class="log_three_list_top_left"> | ||
620 | + <if condition="$vo.is_courier eq 1"> | ||
621 | + <div class="log_three_list_top_lo"> | ||
622 | + <img src="__TMPL__/public/assets/images/fangkuang.png" | ||
623 | + data-indent-id="{$vo['id']}" alt=""/> | ||
624 | + </div> | ||
625 | + </if> | ||
626 | + <div class="log_three_list_top_lt"> | ||
627 | + <div class="log_three_zhongbiao"> | ||
628 | + <img src="__TMPL__/public/assets/images/52.png" alt=""/> | ||
629 | + </div> | ||
630 | + <div class="log_three_shijian"> | ||
631 | + {$vo['pay_time']} | ||
632 | + </div> | ||
633 | + </div> | ||
634 | + </div> | ||
635 | + <div class="log_three_list_top_right"> | ||
636 | + <if condition="$vo.state eq 2"> | ||
637 | + 代发货 | ||
638 | + <elseif condition="$vo.state eq 5"/> | ||
639 | + 已发货 | ||
640 | + <elseif condition="$vo.state eq 3"/> | ||
641 | + 已完成 | ||
642 | + </if> | ||
643 | + </div> | ||
644 | + </div> | ||
645 | + <a href="{:url('get_one',array('id'=>$vo['id']))}"> | ||
646 | + <foreach name="$vo.indent_goods" item="i_g"> | ||
647 | + <div class="log_three_list_center" style="display: flex;justify-content: flex-start;"> | ||
648 | + <div class="log_three_list_center_left" style="width: 1.44rem;height:1.44rem"> | ||
649 | + <img src="{:cmf_get_image_url($i_g.thumbnail)}" alt="" | ||
650 | + style="width: 100%;height: 100%;"/> | ||
651 | + </div> | ||
652 | + <div class="log_three_list_center_right" style="margin-left: 0.16rem;"> | ||
653 | + <div class="log_three_center_one"> | ||
654 | + {$i_g.book_name} | ||
655 | + </div> | ||
656 | + <div class="log_three_center_two">×{$i_g.number}</div> | ||
657 | + <div class="log_three_center_three"><span>¥</span>{$i_g.price}</div> | ||
658 | + </div> | ||
659 | + </div> | ||
660 | + </foreach> | ||
661 | + </a> | ||
662 | + <!-- 立即发货 --> | ||
663 | + <div class="log_three_bottom_btn"> | ||
664 | + <if condition="$vo.state eq 2"> | ||
665 | + <div class="log_three_bottom" data-indent-id="{$vo.id}" data-is_courier="{$vo.is_courier}"> | ||
666 | + 立即发货 | ||
667 | + </div> | ||
668 | + <elseif condition="$vo.state eq 5"/> | ||
669 | + <if condition="$vo.is_courier eq 2"> | ||
670 | + <a href="{:url('logistics/index',array('indent_id'=>$vo['id']))}"> | ||
671 | + <div class="log_three_bottom2" data-indent-id="{$vo.id}"> | ||
672 | + 查看物流 | ||
673 | + </div> | ||
674 | + </a> | ||
675 | + <div class="log_three_bottom" data-indent-id="{$vo.id}"> | ||
676 | + 已完成 | ||
677 | + </div> | ||
678 | + </if> | ||
679 | + <elseif condition="$vo.state eq 3"/> | ||
680 | + <!--<div class="log_three_bottom" data-indent-id="{$vo.id}">--> | ||
681 | + <!--已完成啦--> | ||
682 | + <!--</div>--> | ||
683 | + </if> | ||
684 | + </div> | ||
685 | + </div> | ||
686 | + </if> | ||
687 | + </foreach> | ||
688 | + <empty name="$arr3"> | ||
689 | + <div style="text-align: center;width: 100%;height:100%;margin:0 auto;">暂无数据</div> | ||
690 | + </empty> | ||
691 | + </div> | ||
692 | +</div> | ||
693 | +<!-- 底部按钮 --> | ||
694 | +<div style="position: fixed;bottom:0;width: 100%;"> | ||
695 | + <div class="log_three_list_fixed"> | ||
696 | + <div class="log_three_fixed_left"> | ||
697 | + <div class="log_three_fixed_left_one" style="cursor: pointer"> | ||
698 | + <img src="__TMPL__/public/assets/images/fangkuang.png" alt=""/> | ||
699 | + </div> | ||
700 | + <div class="log_three_fixed_left_two"> | ||
701 | + 全选 | ||
702 | + </div> | ||
703 | + </div> | ||
704 | + <div class="log_three_fixed_right unify_all"> | ||
705 | + 统一发货 | ||
706 | + </div> | ||
707 | + </div> | ||
708 | +</div> | ||
709 | +<script src="__TMPL__/public/assets/js/jquery.js"></script> | ||
710 | +<script src="__TMPL__/public/assets/js/base.js"></script> | ||
711 | +<script src="__TMPL__/public/assets/js/mui.min.js"></script> | ||
712 | +<script src="__TMPL__/public/assets/js/mui.picker.min.js"></script> | ||
713 | +<script src="__TMPL__/public/assets/js/city.data-3.js"></script> | ||
714 | +<script> | ||
715 | + var expresspicker = new mui.PopPicker(); | ||
716 | + | ||
717 | + | ||
718 | + $(".clear").click(function () { | ||
719 | + window.location.reload(); | ||
720 | + }) | ||
721 | + var schoolpicker = new mui.PopPicker(); | ||
722 | + var classpicker = new mui.PopPicker(); | ||
723 | + var class_arr = ''; | ||
724 | + zujian(); | ||
725 | + | ||
726 | + function zujian(data_class_arr) { | ||
727 | + (function ($, doc) { | ||
728 | + $.init(); | ||
729 | + school_arr = {$school}; | ||
730 | + console.log(data_class_arr, 'dfdfds'); | ||
731 | + $.ready(function () { | ||
732 | + schoolpicker.setData(school_arr); | ||
733 | + classpicker.setData(data_class_arr); | ||
734 | + expresspicker.setData([{ | ||
735 | + value: '2', | ||
736 | + text: '快递配送' | ||
737 | + }, { | ||
738 | + value: '1', | ||
739 | + text: '统一配送' | ||
740 | + }]); | ||
741 | + }); | ||
742 | + })(mui, document); | ||
743 | + } | ||
744 | + | ||
745 | + var express_word | ||
746 | + $(".log_three_select_tongyi").click(function () { | ||
747 | + expresspicker.show(function (e) { | ||
748 | + console.log(e, '3333') | ||
749 | + console.log(e[0].value); | ||
750 | + console.log(e[0].text); | ||
751 | + express_word = e[0].value; | ||
752 | + console.log(express_word, "experss_word") | ||
753 | + $(".express_word").text(e[0].text); | ||
754 | + $('.express_word').css('color', '#333333'); | ||
755 | + }); | ||
756 | + }) | ||
757 | + var school_name; | ||
758 | + $(".log_three_select_school2").click(function () { | ||
759 | + $(".log_three_select_class2").text("请选择班级").css("color", "rgba(153, 153, 153, 1)"); | ||
760 | + $("#grade").val(""); | ||
761 | + schoolpicker.show(function (e) { | ||
762 | + school_name = e[0].value; | ||
763 | + school_names = e[0].text; | ||
764 | + $('#school').val(school_names); | ||
765 | + $(".schools_word").text(e[0].text); | ||
766 | + $('.schools_word').css('color', '#333333'); | ||
767 | + $.post("{:url('Personalcenter/get_grade_class')}", {id: school_name}, function (data) { | ||
768 | + if (data) { | ||
769 | + data = JSON.parse(data); | ||
770 | + zujian(data); | ||
771 | + } | ||
772 | + | ||
773 | + }); | ||
774 | + }); | ||
775 | + | ||
776 | + }) | ||
777 | + $(".log_three_select_class2").click(function () { | ||
778 | + if (school_name != undefined) { | ||
779 | + classpicker.show(function (e) { | ||
780 | + class_name = e[0].text; | ||
781 | + $('#grade').val(class_name); | ||
782 | + $(".log_three_select_class2").text(e[0].text); | ||
783 | + $('.log_three_select_class2').css('color', '#333333'); | ||
784 | + }); | ||
785 | + } else { | ||
786 | + alert("请先选择学校") | ||
787 | + } | ||
788 | + }) | ||
789 | + var excompanypicker = new mui.PopPicker(); | ||
790 | + excompanypicker.setData([{ | ||
791 | + value: 'SF', | ||
792 | + text: '顺丰快递' | ||
793 | + }, { | ||
794 | + value: 'YTO', | ||
795 | + text: '圆通快递' | ||
796 | + }, { | ||
797 | + value: 'ZTO', | ||
798 | + text: '中通快递' | ||
799 | + }, { | ||
800 | + value: 'STO', | ||
801 | + text: '申通快递' | ||
802 | + }, { | ||
803 | + value: 'YD', | ||
804 | + text: '韵达快递' | ||
805 | + }, { | ||
806 | + value: 'HHTT', | ||
807 | + text: '天天快递' | ||
808 | + }, { | ||
809 | + value: 'HTKY', | ||
810 | + text: '百世快递' | ||
811 | + }, { | ||
812 | + value: 'YZPY', | ||
813 | + text: '邮政快递包裹' | ||
814 | + }, { | ||
815 | + value: 'EMS', | ||
816 | + text: 'EMS' | ||
817 | + }, { | ||
818 | + value: 'DBL', | ||
819 | + text: '德邦快递' | ||
820 | + }, { | ||
821 | + value: 'ZJS', | ||
822 | + text: '宅急送' | ||
823 | + }, { | ||
824 | + value: 'TNT', | ||
825 | + text: 'TNT快递' | ||
826 | + }]); | ||
827 | + var excompany_word | ||
828 | + $(".excompany").click(function () { | ||
829 | + excompanypicker.show(function (e) { | ||
830 | + console.log(e, '3333') | ||
831 | + console.log(e[0].value); | ||
832 | + console.log(e[0].text); | ||
833 | + school_name = e[0].value | ||
834 | + $(".excompany_word").text(e[0].text); | ||
835 | + $("#logistic_name").val(e[0].value); | ||
836 | + $('.excompany_word').css('color', '#333333'); | ||
837 | + }); | ||
838 | + }) | ||
839 | +</script> | ||
840 | +<script> | ||
841 | + function zZFun(e) { | ||
842 | + window.event ? (window.event.cancelBubble = true) : e.stopPropagation(); | ||
843 | + } | ||
844 | + | ||
845 | + // 选择学校 | ||
846 | + // $(".three_model_school_left").click(function () { | ||
847 | + // var indexs = $(this).index(); | ||
848 | + // $(".three_model_school_data").eq(indexs).css("display", "block").siblings().css("display", "none"); | ||
849 | + // }); | ||
850 | + | ||
851 | + $(".log_three_tab_one").click(function () { | ||
852 | + var tabIndex = $(this).index(); | ||
853 | + $(this).addClass("log_three_tab_two").addClass("word_color").addClass('aaa').siblings().removeClass("log_three_tab_two").removeClass("word_color").removeClass("aaa"); | ||
854 | + $('.log_three_list_contant').eq(tabIndex).css('display', 'block').siblings().css('display', 'none'); | ||
855 | + search(); | ||
856 | + $('.log_three_fixed_left_one img').attr('src', "__TMPL__/public/assets/images/fangkuang.png") | ||
857 | + }); | ||
858 | + $(".three_model_school_tab>div").click(function () { | ||
859 | + $(this).addClass("three_model_school_hover").addClass("word_color").addClass('aaa').siblings().removeClass("three_model_school_hover").removeClass("word_color").removeClass("aaa"); | ||
860 | + }); | ||
861 | + | ||
862 | + $("body").on('click', '.log_three_list_top_lo', function () { | ||
863 | + if ($(this).find("img").attr("src") == "__TMPL__/public/assets/images/fangkuang.png") { | ||
864 | + $(this).find("img").attr("src", "__TMPL__/public/assets/images/xuanzhong (1).png"); | ||
865 | + } else { | ||
866 | + $(this).find("img").attr("src", "__TMPL__/public/assets/images/fangkuang.png"); | ||
867 | + } | ||
868 | + //判断订单是否全选了 | ||
869 | + check(); | ||
870 | + }); | ||
871 | + | ||
872 | + function check() { | ||
873 | + var index = $(".log_three_tab_top .log_three_tab_one").index($('.aaa')); | ||
874 | + var length = $(".log_three_list_contant").eq(index).find('.log_three_list_top_lo img').length; | ||
875 | + var l = 0; | ||
876 | + for (var n = 0; n < length; n++) { | ||
877 | + console.log($(".log_three_list_contant").eq(index).find('.log_three_list_top_lo img').eq(n).attr('src')); | ||
878 | + if ($(".log_three_list_contant").eq(index).find('.log_three_list_top_lo img').eq(n).attr('src') == "__TMPL__/public/assets/images/xuanzhong (1).png") { | ||
879 | + l++ | ||
880 | + } | ||
881 | + } | ||
882 | + console.log('@@@@@' + l + '@@@@@' + length); | ||
883 | + if (l == length) { | ||
884 | + $('.log_three_fixed_left_one img').attr('src', "__TMPL__/public/assets/images/xuanzhong (1).png") | ||
885 | + } else { | ||
886 | + $('.log_three_fixed_left_one img').attr('src', "__TMPL__/public/assets/images/fangkuang.png") | ||
887 | + } | ||
888 | + } | ||
889 | + | ||
890 | + $(".log_three_fixed_left_one").click(function () { | ||
891 | + if ( | ||
892 | + $(this) | ||
893 | + .find("img") | ||
894 | + .attr("src") == "__TMPL__/public/assets/images/fangkuang.png" | ||
895 | + ) { | ||
896 | + $(this) | ||
897 | + .find("img") | ||
898 | + .attr("src", "__TMPL__/public/assets/images/xuanzhong (1).png"); | ||
899 | + $(".log_three_list_top_lo") | ||
900 | + .find("img") | ||
901 | + .attr("src", "__TMPL__/public/assets/images/xuanzhong (1).png"); | ||
902 | + } else { | ||
903 | + $(this) | ||
904 | + .find("img") | ||
905 | + .attr("src", "__TMPL__/public/assets/images/fangkuang.png"); | ||
906 | + $(".log_three_list_top_lo") | ||
907 | + .find("img") | ||
908 | + .attr("src", "__TMPL__/public/assets/images/fangkuang.png"); | ||
909 | + } | ||
910 | + }); | ||
911 | + | ||
912 | + $(".log_three_select_peisong").click(function () { | ||
913 | + $(".tx_mask").css({ | ||
914 | + display: "block" | ||
915 | + }); | ||
916 | + }); | ||
917 | + | ||
918 | + //统一配送 | ||
919 | + // $(".log_three_select_tongyi").click(function () { | ||
920 | + // $(".tx_mask_tongyi").css({ | ||
921 | + // display: "block" | ||
922 | + // }); | ||
923 | + // }) | ||
924 | + // $(".tx_mask_tongyi .three_modal_kuaidi_name").click(function () { | ||
925 | + // var index = $(this).index(); | ||
926 | + // $(this).addClass('there_unActive').siblings().removeClass('there_unActive'); | ||
927 | + // $('.log_three_select_contant').text($(this).text()).css("color", "#333"); | ||
928 | + // $(".tx_mask_tongyi").hide(); | ||
929 | + // $("#is_courier").val($(this).attr('data-id')) | ||
930 | + // }) | ||
931 | + //选择快递方式 | ||
932 | + $(".log_psong_select").click(function () { | ||
933 | + $(".tx_mask_kuaidi").css({ | ||
934 | + display: "block" | ||
935 | + }); | ||
936 | + }); | ||
937 | + $(".tx_mask_kuaidi .get_Go").click(function () { | ||
938 | + var index = $(this).index(); | ||
939 | + console.log($(this).text()); | ||
940 | + $(this).addClass('there_unActive').siblings().removeClass('there_unActive'); | ||
941 | + $('.get_Gofo').text($(this).text()).css("color", "#333"); | ||
942 | + $(".tx_mask_kuaidi").hide(); | ||
943 | + $('#logistic_name').val($(this).attr('data-name')) | ||
944 | + }); | ||
945 | + var index = $(".log_three_bottom").index(); | ||
946 | + $("body").on('click', '.log_three_bottom', function () { | ||
947 | + $(".tx_maskone").css({ | ||
948 | + display: "block" | ||
949 | + }); | ||
950 | + }); | ||
951 | + $('body').on('click', ".there_class div", function () { | ||
952 | + var index2 = $(this).index(); | ||
953 | + $(this).addClass("there_unActive").siblings().removeClass("there_unActive"); | ||
954 | + if ($xuexiao == undefined) { | ||
955 | + alert('请选择学校') | ||
956 | + } else if ($(this).hasClass("there_unActive")) { | ||
957 | + var banji = $(this).text(); | ||
958 | + $('.log_three_select_school2').text($xuexiao + ' ' + "-" + ' ' + banji); | ||
959 | + $(".log_three_select_school2").css("color", "#333") | ||
960 | + $(".tx_mask_school").hide(); | ||
961 | + $('#school').val($xuexiao); | ||
962 | + $('#grade').val(banji); | ||
963 | + } | ||
964 | + }) | ||
965 | + // 关闭弹窗 | ||
966 | + $(document).mouseup(function (e) { | ||
967 | + var _con = $('.tx_maskCon_school'); | ||
968 | + if (!_con.is(e.target) && _con.has(e.target).length === 0) { | ||
969 | + $('.tx_mask_school').hide() | ||
970 | + } | ||
971 | + }); | ||
972 | + | ||
973 | + function search() { | ||
974 | + var school = $('#school').val(); | ||
975 | + var grade = $('#grade').val(); | ||
976 | + var state = $('.log_three_tab_top .aaa').attr('data-state'); | ||
977 | + var is_courier = express_word | ||
978 | + | ||
979 | + $.ajax({ | ||
980 | + 'url': "{:url('order_salesman/getOrderSalesman')}", | ||
981 | + 'type': "GET", | ||
982 | + 'data': {'school': school, 'grade': grade, 'state': state, 'is_courier': is_courier}, | ||
983 | + 'success': (function (data) { | ||
984 | + var index = $('.log_three_tab_top div').index($('.aaa')); | ||
985 | + if (data.code == 1) { | ||
986 | + var result = data.data; | ||
987 | + console.log("**********" + result.length); | ||
988 | + if (result.length == 0) { | ||
989 | + var html = "<div style=\"text-align: center;width: 100%;height:100%;margin:0 auto;\">暂无数据</div>"; | ||
990 | + } else { | ||
991 | + var html = ''; | ||
992 | + } | ||
993 | + for (var i = 0; i < result.length; i++) { | ||
994 | + if (result[i]['state'] == 2) { | ||
995 | + var state = '待发货'; | ||
996 | + if (result[i]['is_courier'] == 1) { | ||
997 | + 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" + | ||
998 | + "\t\t\t\t\t\t\t\t\t\t立即发货\n" + | ||
999 | + "\t\t\t\t\t\t\t\t\t</div></div>"; | ||
1000 | + } else { | ||
1001 | + 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" + | ||
1002 | + "\t\t\t\t\t\t\t\t\t\t立即发货\n" + | ||
1003 | + "\t\t\t\t\t\t\t\t\t</div></div>"; | ||
1004 | + } | ||
1005 | + } else if (result[i]['state'] == 5) { | ||
1006 | + var state = '已发货'; | ||
1007 | + if (result[i]['is_courier'] == 2) { | ||
1008 | + var html_bottom = "<a href=\"{:url('logistics/index','',false,true)}/indent_id/" + result[i].id + "\">\n" + | ||
1009 | + "\t\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_bottom_btn\"><div class=\"log_three_bottom2\" data-indent-id=\"" + result[i].id + "\">\n" + | ||
1010 | + "\t\t\t\t\t\t\t\t\t\t\t\t查看物流\n" + | ||
1011 | + "\t\t\t\t\t\t\t\t\t\t\t</div></div>\n" + | ||
1012 | + "\t\t\t\t\t\t\t\t\t\t</a>"; | ||
1013 | + } else { | ||
1014 | + var html_bottom = "<a href=\"{:url('logistics/index','',false,true)}/indent_id/" + result[i].id + "\">\n" + | ||
1015 | + " <div class=\"log_three_bottom2\" data-indent-id=\""+ result[i].id +"\" style='margin-right: 15px;'>\n" + | ||
1016 | + " 查看物流\n" + | ||
1017 | + " </div>\n" + | ||
1018 | + " </a><div class=\"take_one\" data-indent-id=\"" + result[i].id + "\">\n" + | ||
1019 | + " 完成\n" + | ||
1020 | + " </div>"; | ||
1021 | + } | ||
1022 | + } else { | ||
1023 | + var state = '已完成'; | ||
1024 | + var html_bottom = ""; | ||
1025 | + } | ||
1026 | + var indent_goods_data = result[i].indent_goods; | ||
1027 | + var indent_goods_html = ''; | ||
1028 | + for (var i3 = 0; i3 < indent_goods_data.length; i3++) { | ||
1029 | + // indent_goods_html += "<div class=\"log_three_list_center\" style=\"display: flex;justify-content: flex-start;\">\n" + | ||
1030 | + // " <div class=\"log_three_list_center_left\" style=\"width: 1.44rem;height:1.44rem\">\n" + | ||
1031 | + // " <img src=\"" + indent_goods_data[i3].thumbnail + "\" alt=\"\" style=\"width: 100%;height: 100%;\"/>\n" + | ||
1032 | + // " </div>\n" + | ||
1033 | + // " <div class=\"log_three_list_center_right\" style=\"margin-left: 0.16rem;\">\n" + | ||
1034 | + // " <div class=\"log_three_center_one\">\n" + | ||
1035 | + // " " + indent_goods_data[i3].book_name + "\n" + | ||
1036 | + // " </div>\n" + | ||
1037 | + // " <div class=\"log_three_center_two\">×" + indent_goods_data[i3].number + "</div>\n" + | ||
1038 | + // " <div class=\"log_three_center_three\"><span>¥</span>" + indent_goods_data[i3].price + "</div>\n" + | ||
1039 | + // " </div>\n" + | ||
1040 | + // " </div>"; | ||
1041 | + if (result[i].is_courier == 2) { | ||
1042 | + indent_goods_html += "<div class=\"dingdan_detail\">\n" + | ||
1043 | + " <div class=\"log_three_list_center\" style=\"display: flex;justify-content: flex-start;\">\n" + | ||
1044 | + " <div class=\"log_three_list_center_left\" style=\"width: 1.44rem;height:1.44rem\">\n" + | ||
1045 | + " <img src=\"" + indent_goods_data[i3].thumbnail + "\" alt=\"\"\n" + | ||
1046 | + " style=\"width: 100%;height: 100%;\"/>\n" + | ||
1047 | + " </div>\n" + | ||
1048 | + " <div class=\"right_dingdan\">\n" + | ||
1049 | + " <div class=\"right_dingdan_top\">\n" + | ||
1050 | + " <div class=\"right_dingdan_one\">" + indent_goods_data[i3].book_name + "</div>\n" + | ||
1051 | + " <div class=\"right_dingdan_two\">¥" + indent_goods_data[i3].price + "</div>\n" + | ||
1052 | + " </div>\n" + | ||
1053 | + " <div class=\"right_dingdan_center\">\n" + | ||
1054 | + " <div class=\"right_dindan_three right_dingdan_one\">x" + indent_goods_data[i3].number + "</div>\n" + | ||
1055 | + " </div>\n" + | ||
1056 | + "\n" + | ||
1057 | + " <div class=\"right_dingdan_four right_dingdan_one\">" + result[i].region + " " + result[i].detailed + "\n" + | ||
1058 | + " </div>\n" + | ||
1059 | + " <div class=\"right_dingdan_four right_dingdan_one\" style=\"margin-top: -0.05rem;\">\n" + | ||
1060 | + " " + result[i].name + " " + result[i].phone + "\n" + | ||
1061 | + " </div>\n" + | ||
1062 | + " </div>\n" + | ||
1063 | + " </div>\n" + | ||
1064 | + " </div>"; | ||
1065 | + } else { | ||
1066 | + indent_goods_html += "<div class=\"dingdan_detail\">\n" + | ||
1067 | + " <div class=\"log_three_list_center\" style=\"display: flex;justify-content: flex-start;\">\n" + | ||
1068 | + " <div class=\"log_three_list_center_left\" style=\"width: 1.44rem;height:1.44rem\">\n" + | ||
1069 | + " <img src=\"" + indent_goods_data[i3].thumbnail + "\" alt=\"\"\n" + | ||
1070 | + " style=\"width: 100%;height: 100%;\"/>\n" + | ||
1071 | + " </div>\n" + | ||
1072 | + " <div class=\"right_dingdan\">\n" + | ||
1073 | + " <div class=\"right_dingdan_top\">\n" + | ||
1074 | + " <div class=\"right_dingdan_one\">" + indent_goods_data[i3].book_name + "</div>\n" + | ||
1075 | + " <div class=\"right_dingdan_two\">¥" + indent_goods_data[i3].price + "</div>\n" + | ||
1076 | + " </div>\n" + | ||
1077 | + " <div class=\"right_dingdan_center\">\n" + | ||
1078 | + " <div class=\"right_dindan_three right_dingdan_one\">x" + indent_goods_data[i3].number + "</div>\n" + | ||
1079 | + " </div>\n" + | ||
1080 | + "\n" + | ||
1081 | + " <div class=\"right_dingdan_four right_dingdan_one\">" + result[i].school + " " + result[i].grade + "\n" + | ||
1082 | + " " + result[i].class + "\n" + | ||
1083 | + " </div>\n" + | ||
1084 | + " <div class=\"right_dingdan_four right_dingdan_one\" style=\"margin-top: -0.05rem;\">\n" + | ||
1085 | + " " + result[i].name + " " + result[i].phone + "\n" + | ||
1086 | + " </div>\n" + | ||
1087 | + " </div>\n" + | ||
1088 | + " </div>\n" + | ||
1089 | + " </div>"; | ||
1090 | + } | ||
1091 | + } | ||
1092 | + if (result[i].is_courier == 1) { | ||
1093 | + html += "<div class=\"log_three_list order_" + result[i].id + "\">\n" + | ||
1094 | + "\t\t\t\t\t\t\t<div class=\"log_three_list_top\">\n" + | ||
1095 | + "\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_left\">\n" + | ||
1096 | + "\t\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_lo\">\n" + | ||
1097 | + "\t\t\t\t\t\t\t\t\t\t<img src=\"__TMPL__/public/assets/images/fangkuang.png\" data-indent-id=\"" + result[i].id + "\" alt=\"\" />\n" + | ||
1098 | + "\t\t\t\t\t\t\t\t\t</div>\n" + | ||
1099 | + "\t\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_lt\">\n" + | ||
1100 | + "\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_zhongbiao\">\n" + | ||
1101 | + "\t\t\t\t\t\t\t\t\t\t\t<img src=\"__TMPL__/public/assets/images/52.png\" alt=\"\" />\n" + | ||
1102 | + "\t\t\t\t\t\t\t\t\t\t</div>\n" + | ||
1103 | + "\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_shijian\">\n" + | ||
1104 | + "\t\t\t\t\t\t\t\t\t\t\t" + result[i].pay_time + "\n" + | ||
1105 | + "\t\t\t\t\t\t\t\t\t\t</div>\n" + | ||
1106 | + "\t\t\t\t\t\t\t\t\t</div>\n" + | ||
1107 | + "\t\t\t\t\t\t\t\t</div>\n" + | ||
1108 | + "\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_right\">\n" + | ||
1109 | + "\t\t\t\t\t\t\t\t\t\t" + state + "\n" + | ||
1110 | + "\t\t\t\t\t\t\t\t</div>\n" + | ||
1111 | + "\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" + | ||
1112 | + " <div class=\"dingdan_detail_hao\">订单号:" + result[i].order_number + "</div>\n" + | ||
1113 | + " </div>\n" + indent_goods_html + "</a>" + | ||
1114 | + "\t\t\t\t\t\t<div class=\"log_three_bottom_btn\">" + html_bottom + "</div></div>"; | ||
1115 | + } else if (result[i].is_courier == 2) { | ||
1116 | + console.log("++"+html); | ||
1117 | + html += "<div class=\"log_three_list order_" + result[i].id + "\">\n" + | ||
1118 | + "\t\t\t\t\t\t\t<div class=\"log_three_list_top\">\n" + | ||
1119 | + "\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_left\">\n" + | ||
1120 | + // "\t\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_lo\">\n" + | ||
1121 | + // "\t\t\t\t\t\t\t\t\t\t<img src=\"__TMPL__/public/assets/images/fangkuang.png\" alt=\"\" />\n" + | ||
1122 | + // "\t\t\t\t\t\t\t\t\t</div>\n" + | ||
1123 | + "\t\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_lt\">\n" + | ||
1124 | + "\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_zhongbiao\">\n" + | ||
1125 | + "\t\t\t\t\t\t\t\t\t\t\t<img src=\"__TMPL__/public/assets/images/52.png\" alt=\"\" />\n" + | ||
1126 | + "\t\t\t\t\t\t\t\t\t\t</div>\n" + | ||
1127 | + "\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_shijian\">\n" + | ||
1128 | + "\t\t\t\t\t\t\t\t\t\t\t" + result[i].pay_time + "\n" + | ||
1129 | + "\t\t\t\t\t\t\t\t\t\t</div>\n" + | ||
1130 | + "\t\t\t\t\t\t\t\t\t</div>\n" + | ||
1131 | + "\t\t\t\t\t\t\t\t</div>\n" + | ||
1132 | + "\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_right\">\n" + | ||
1133 | + "\t\t\t\t\t\t\t\t\t\t" + state + "\n" + | ||
1134 | + "\t\t\t\t\t\t\t\t</div>\n" + | ||
1135 | + "\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" + | ||
1136 | + " <div class=\"dingdan_detail_hao\">订单号:" + result[i].order_number + "</div>\n" + | ||
1137 | + " </div>\n" + indent_goods_html + "</a>" + | ||
1138 | + "\t\t\t\t\t\t<div class=\"log_three_bottom_btn\">" + html_bottom + "</div></div>"; | ||
1139 | + } | ||
1140 | + } | ||
1141 | + console.log(html); | ||
1142 | + $('.count').html(i); | ||
1143 | + console.log('@@@@@@@@@@' + index); | ||
1144 | + $('.log_three_list_contant').eq(index).html(html); | ||
1145 | + update(); | ||
1146 | + } else { | ||
1147 | + alert('未知错误'); | ||
1148 | + } | ||
1149 | + }), | ||
1150 | + 'error': (function () { | ||
1151 | + alert('与服务器断开连接'); | ||
1152 | + }) | ||
1153 | + }) | ||
1154 | + // } | ||
1155 | + } | ||
1156 | + | ||
1157 | + $(function () { | ||
1158 | + $('.school').click(function () { | ||
1159 | + var school_id = $(this).attr('data-id'); | ||
1160 | + $.ajax({ | ||
1161 | + url: "{:url('order_salesman/getGradeClass')}", | ||
1162 | + type: 'GET', | ||
1163 | + data: {'school_id': school_id}, | ||
1164 | + success: (function (data) { | ||
1165 | + if (data.code == 1) { | ||
1166 | + var result = data.data; | ||
1167 | + var html = ''; | ||
1168 | + for (var i = 0; i < result.length; i++) { | ||
1169 | + var i2 = Number(result[i].start); | ||
1170 | + var j = Number(result[i].end); | ||
1171 | + for (i2; i2 <= j; i2++) { | ||
1172 | + // if(i == 0){ | ||
1173 | + // html += "<div class=\"three_model_school_name there_unActive\" data-id=\""+result[i].id+"\">"+result[i].grade+"—"+i2+"</div>"; | ||
1174 | + // } | ||
1175 | + html += "<div class=\"three_model_class_name\" data-id=\"" + result[i].id + "\">" + result[i].grade + "-" + i2 + "班</div>"; | ||
1176 | + } | ||
1177 | + } | ||
1178 | + $('.grade').html(html); | ||
1179 | + } else { | ||
1180 | + alert(data.msg); | ||
1181 | + } | ||
1182 | + }) | ||
1183 | + }) | ||
1184 | + }) | ||
1185 | + $('.search').click(function () { | ||
1186 | + search(); | ||
1187 | + }); | ||
1188 | + //发货 | ||
1189 | + $("body").on('click', '.send', function () { | ||
1190 | + var indent_id = $(this).attr('data-indent-id'); | ||
1191 | + var is_courier = $(this).attr('data-is_courier'); | ||
1192 | + if (is_courier == 1) { | ||
1193 | + //统一配送 | ||
1194 | + $('.time').show(); | ||
1195 | + $('.logistic').hide(); | ||
1196 | + } else if (is_courier == 2) { | ||
1197 | + //快递 | ||
1198 | + $('.time').hide(); | ||
1199 | + $('.logistic').show(); | ||
1200 | + } | ||
1201 | + $('.confirm').attr('data-is_courier', is_courier); | ||
1202 | + $('.confirm').attr('data-indent-id', indent_id); | ||
1203 | + $('.confirm').attr('data-is_courier', is_courier); | ||
1204 | + }); | ||
1205 | + //点击确认 | ||
1206 | + $('.confirm').click(function () { | ||
1207 | + var is_courier = $(this).attr('data-is_courier'); | ||
1208 | + var start_time = $('#start_time').val(); | ||
1209 | + // var end_time = $('#end_time').val(); | ||
1210 | + var logistic_name = $('#logistic_name').val(); | ||
1211 | + console.log(logistic_name); | ||
1212 | + var logistic_code = $('#logistic_code').val(); | ||
1213 | + var indent_id = $(this).attr('data-indent-id'); | ||
1214 | + if (is_courier == 1) { | ||
1215 | + if (start_time == '') { | ||
1216 | + alert('请填写配送时间'); | ||
1217 | + return false; | ||
1218 | + } | ||
1219 | + // else if (end_time == '') { | ||
1220 | + // alert('请填写配送时间'); | ||
1221 | + // return false; | ||
1222 | + // } | ||
1223 | + } else if (is_courier == 2) { | ||
1224 | + if (logistic_name == '') { | ||
1225 | + alert('请填写快递公司'); | ||
1226 | + return false; | ||
1227 | + } else if (logistic_code == '') { | ||
1228 | + alert('请填写快递单号'); | ||
1229 | + return false; | ||
1230 | + } | ||
1231 | + } else if (is_courier == '') { | ||
1232 | + alert('未知错误'); | ||
1233 | + return false; | ||
1234 | + } | ||
1235 | + $.ajax({ | ||
1236 | + url: "{:url('order_salesman/send')}", | ||
1237 | + type: "GET", | ||
1238 | + data: { | ||
1239 | + 'start_time': start_time, | ||
1240 | + // 'end_time': end_time, | ||
1241 | + 'logistic_name': logistic_name, | ||
1242 | + 'logistic_code': logistic_code, | ||
1243 | + 'is_courier': is_courier, | ||
1244 | + 'indent_id': indent_id | ||
1245 | + }, | ||
1246 | + success: function (res) { | ||
1247 | + if (res.code == 1) { | ||
1248 | + $('.order_' + indent_id).remove(); | ||
1249 | + $(".tx_maskone").css({ | ||
1250 | + display: "none" | ||
1251 | + }); | ||
1252 | + $(".tx_mask").css({ | ||
1253 | + display: "none" | ||
1254 | + }); | ||
1255 | + } | ||
1256 | + var count = Number($('.count').text()); | ||
1257 | + if (count > 0) { | ||
1258 | + count--; | ||
1259 | + } | ||
1260 | + $(".count").text(count); | ||
1261 | + alert(res.msg) | ||
1262 | + }, | ||
1263 | + error: function (res) { | ||
1264 | + alert('与服务器断开连接') | ||
1265 | + } | ||
1266 | + }) | ||
1267 | + }); | ||
1268 | + $('body').on('click', '.unify_all', function () { | ||
1269 | + var index = $(".log_three_tab_top .log_three_tab_one").index($('.aaa')); | ||
1270 | + var length = $(".log_three_list_contant").eq(index).find('.log_three_list_top_lo img').length - 1; | ||
1271 | + var arr = []; | ||
1272 | + for (var i = 0; i <= length; i++) { | ||
1273 | + if ($('.log_three_list_top_lo img').eq(i).attr('src') == "__TMPL__/public/assets/images/xuanzhong (1).png") { | ||
1274 | + arr.push($('.log_three_list_top_lo img').eq(i).attr('data-indent-id')); | ||
1275 | + } | ||
1276 | + } | ||
1277 | + $('.confirm2').attr('data-indent-id', arr.join(",")); | ||
1278 | + var type = $('.unify_all').attr('data-type'); | ||
1279 | + if (arr.length != 0) { | ||
1280 | + if (type == 1) { | ||
1281 | + $.ajax({ | ||
1282 | + url: "{:url('take_all')}", | ||
1283 | + type: "GET", | ||
1284 | + data: {'indent_ids': arr.join(",")}, | ||
1285 | + success: function (res) { | ||
1286 | + if (res.code == 1) { | ||
1287 | + var count = Number($('.count').text()); | ||
1288 | + $(arr).each(function (i, vo) { | ||
1289 | + if (count > 0) { | ||
1290 | + count--; | ||
1291 | + } | ||
1292 | + $('.order_' + vo).remove(); | ||
1293 | + }); | ||
1294 | + $(".count").text(count); | ||
1295 | + alert('操作成功') | ||
1296 | + } else { | ||
1297 | + alert(res.msg); | ||
1298 | + } | ||
1299 | + } | ||
1300 | + }) | ||
1301 | + } else { | ||
1302 | + $('.tx_masktwo').show(); | ||
1303 | + } | ||
1304 | + } else { | ||
1305 | + alert('请至少选择一个订单'); | ||
1306 | + } | ||
1307 | + }); | ||
1308 | + $('.confirm2').click(function () { | ||
1309 | + var start_time2 = $('#start_time2').val(); | ||
1310 | + // var end_time2 = $('#end_time2').val(); | ||
1311 | + var indent_ids = $(this).attr('data-indent-id'); | ||
1312 | + if (indent_ids == '') { | ||
1313 | + alert('请至少选择一个订单'); | ||
1314 | + } else if (start_time2 == '') { | ||
1315 | + alert('请选择配送时间') | ||
1316 | + } | ||
1317 | + // else if (end_time2 == '') { | ||
1318 | + // alert('请选择配送时间') | ||
1319 | + // } | ||
1320 | + else { | ||
1321 | + $.ajax({ | ||
1322 | + url: "{:url('order_salesman/send_all')}", | ||
1323 | + type: "GET", | ||
1324 | + data: { | ||
1325 | + 'start_time2': start_time2, | ||
1326 | + // 'end_time2': end_time2, | ||
1327 | + 'indent_ids': indent_ids | ||
1328 | + }, | ||
1329 | + success: function (res) { | ||
1330 | + console.log(indent_ids); | ||
1331 | + indent_ids = indent_ids.split(","); | ||
1332 | + console.log(indent_ids) | ||
1333 | + if (res.code == 1) { | ||
1334 | + $.each(indent_ids, function (key, indent_id) { | ||
1335 | + $('.order_' + indent_id).remove(); | ||
1336 | + }); | ||
1337 | + $(".tx_masktwo").css({ | ||
1338 | + display: "none" | ||
1339 | + }); | ||
1340 | + alert(res.msg) | ||
1341 | + } else { | ||
1342 | + alert(res.msg); | ||
1343 | + } | ||
1344 | + } | ||
1345 | + }) | ||
1346 | + } | ||
1347 | + }); | ||
1348 | + update(); | ||
1349 | + | ||
1350 | + $('body').on('click', '.take_one', function () { | ||
1351 | + var indent_id = $(this).attr('data-indent-id'); | ||
1352 | + $.ajax({ | ||
1353 | + url: "{:url('take_one')}", | ||
1354 | + type: "GET", | ||
1355 | + data: {'indent_id': indent_id}, | ||
1356 | + success: function (res) { | ||
1357 | + if (res.code == 1) { | ||
1358 | + $('.order_' + indent_id).remove(); | ||
1359 | + alert('操作成功') | ||
1360 | + } else { | ||
1361 | + alert(res.msg) | ||
1362 | + } | ||
1363 | + } | ||
1364 | + }) | ||
1365 | + }) | ||
1366 | + }) | ||
1367 | + | ||
1368 | + function update() { | ||
1369 | + var is_courier = $('#is_courier').val(); | ||
1370 | + var index = $('.log_three_tab_top').children('.aaa').index(); | ||
1371 | + if (is_courier == 1 && index == 0) { | ||
1372 | + $('.log_three_list_fixed').show(); | ||
1373 | + $('.unify_all').text('统一发货'); | ||
1374 | + $('.unify_all').attr('data-type', '') | ||
1375 | + } else if (is_courier == 2 || (index != 0 && index != 1)) { | ||
1376 | + $('.log_three_list_fixed').hide(); | ||
1377 | + } else if (index == 1) { | ||
1378 | + $('.unify_all').text('统一完成'); | ||
1379 | + $('.unify_all').attr('data-type', 1) | ||
1380 | + } | ||
1381 | + } | ||
1382 | +</script> | ||
1383 | +<script type="text/javascript"> | ||
1384 | + var dtpicker = new mui.DtPicker({ | ||
1385 | + type: "date", //设置日历初始视图模式 | ||
1386 | + beginDate: new Date(2015, 04, 25), //设置开始日期 | ||
1387 | + labels: ['年', '月', '日'], //设置默认标签区域提示语 | ||
1388 | + }) | ||
1389 | + //统一配送选择时间 | ||
1390 | + $(".tongyi_start_time").click(function () { | ||
1391 | + dtpicker.show(function (e) { | ||
1392 | + console.log(e); | ||
1393 | + $('.tongyi_start_time').text(e.text); | ||
1394 | + $('#start_time').val(e.text); | ||
1395 | + $('.tongyi_start_time').css('color', '#333333'); | ||
1396 | + }); | ||
1397 | + }); | ||
1398 | + | ||
1399 | + $(".tongyi_start_time2").click(function () { | ||
1400 | + dtpicker.show(function (e) { | ||
1401 | + console.log(e); | ||
1402 | + $('.tongyi_start_time2').text(e.text); | ||
1403 | + $('#start_time2').val(e.text); | ||
1404 | + $('.tongyi_start_time2').css('color', '#333333'); | ||
1405 | + }); | ||
1406 | + }); | ||
1407 | + | ||
1408 | + function zZFun(e) { | ||
1409 | + window.event ? (window.event.cancelBubble = true) : e.stopPropagation(); | ||
1410 | + } | ||
1411 | +</script> | ||
1412 | +<script src="https://cdn.bootcss.com/html2canvas/0.5.0-beta4/html2canvas.js"></script> | ||
1413 | +<script> | ||
1414 | + $(".html2canvas").click(function () { | ||
1415 | + // html2canvas($(".log_three_list_contant")).then(function (canvas) { | ||
1416 | + // var imgUri = canvas.toDataURL("image/png").replace("image/png", "image/octet-stream"); // 获取生成的图片的url | ||
1417 | + // window.location.href = imgUri; // 下载图片 | ||
1418 | + // }); | ||
1419 | + | ||
1420 | +alert(132); | ||
1421 | + html2canvas($('.log_three_list_contant'), { | ||
1422 | + onrendered: function (canvas) { | ||
1423 | + var data = canvas.toDataURL("image/jpg","image/octet-stream");//生成的格式 | ||
1424 | + //data就是生成的base64码啦 | ||
1425 | + console.log(data); | ||
1426 | + downloadFile('ceshi.png',data); | ||
1427 | + } | ||
1428 | + }); | ||
1429 | + }); | ||
1430 | + function downloadFile(fileName, content) { | ||
1431 | + let aLink = document.createElement('a'); | ||
1432 | + let blob = this.base64ToBlob(content); //new Blob([content]); | ||
1433 | + | ||
1434 | + let evt = document.createEvent("HTMLEvents"); | ||
1435 | + evt.initEvent("click", true, true);//initEvent 不加后两个参数在FF下会报错 事件类型,是否冒泡,是否阻止浏览器的默认行为 | ||
1436 | + aLink.download = fileName; | ||
1437 | + aLink.href = URL.createObjectURL(blob); | ||
1438 | + | ||
1439 | + // aLink.dispatchEvent(evt); | ||
1440 | + aLink.click() | ||
1441 | + } | ||
1442 | + //base64转blob | ||
1443 | + function base64ToBlob(code) { | ||
1444 | + let parts = code.split(';base64,'); | ||
1445 | + let contentType = parts[0].split(':')[1]; | ||
1446 | + let raw = window.atob(parts[1]); | ||
1447 | + let rawLength = raw.length; | ||
1448 | + | ||
1449 | + let uInt8Array = new Uint8Array(rawLength); | ||
1450 | + | ||
1451 | + for (let i = 0; i < rawLength; ++i) { | ||
1452 | + uInt8Array[i] = raw.charCodeAt(i); | ||
1453 | + } | ||
1454 | + return new Blob([uInt8Array], {type: contentType}); | ||
1455 | + } | ||
1456 | +</script> | ||
1457 | +</body> | ||
1458 | + | ||
1459 | +</html> |
-
请 注册 或 登录 后发表评论