切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
王晓刚
6 years ago
提交
fa05a6dcb1f5da599dafe090ab45341d8b13b32e
1 个父辈
2ae03975
master
...
liuzhen
1 个管道 的构建
通过
耗费 34 秒
图片生成
变更
4
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
1825 行增加
和
102 行删除
app/portal/controller/OrderSalesmanController.php
app/portal/controller/OrderSalesmanController_修改.php
public/themes/simpleboot3/portal/order_salesman/get_all.html
public/themes/simpleboot3/portal/order_salesman/get_all——修改.html
app/portal/controller/OrderSalesmanController.php
查看文件 @
fa05a6d
...
...
@@ -14,6 +14,7 @@ use app\portal\model\IndentGoodsModel;
use
app\portal\model\IndentModel
;
use
cmf\controller\WeChatBaseController
;
use
think\Db
;
use
think\Image
;
class
OrderSalesmanController
extends
WeChatBaseController
{
...
...
@@ -189,23 +190,6 @@ class OrderSalesmanController extends WeChatBaseController
if
(
empty
(
$indent
)){
$this
->
error
(
'查询为空'
);
}
if
(
$indent
[
'is_courier'
]
==
1
){
$school
=
Db
::
name
(
'school'
)
->
where
([
'region'
=>
$indent
[
'region'
],
'uid'
=>
$indent
[
'salesman_uid'
]])
->
select
();
$arr1
=
[];
foreach
(
$school
as
$key
=>
$s
){
$arr1
[
$key
][
'value'
]
=
$s
[
'id'
];
$arr1
[
$key
][
'text'
]
=
$s
[
'school'
];
}
$school_id
=
Db
::
name
(
'school'
)
->
where
([
'region'
=>
$indent
[
'region'
],
'uid'
=>
$indent
[
'salesman_uid'
]])
->
value
(
'id'
);
$grade
=
Db
::
name
(
'grade_class'
)
->
where
([
'school_id'
=>
$school_id
])
->
select
()
->
toArray
();
foreach
(
$grade
as
$key
=>
$g
){
$class
=
explode
(
'-'
,
$g
[
'class'
]);
$grade
[
$key
][
'start'
]
=
$class
[
0
];
$grade
[
$key
][
'end'
]
=
$class
[
1
];
}
$this
->
assign
(
'school'
,
json_encode
(
$arr1
));
$this
->
assign
(
'grade'
,
$grade
);
}
$indentGoodsModel
=
new
IndentGoodsModel
();
$indent_goods
=
$indentGoodsModel
->
selectData
([
'indent_id'
=>
$indent
[
'id'
]]);
if
(
!
empty
(
$indent
[
'indent_address'
])){
...
...
@@ -242,36 +226,49 @@ class OrderSalesmanController extends WeChatBaseController
$this
->
success
(
'更新成功'
);
}
}
public
function
updatePost
(){
$param
=
$this
->
request
->
param
();
$indent_id
=
$this
->
request
->
param
(
'indent_id'
,
0
,
'intval'
);
if
(
empty
(
$indent_id
)){
$this
->
error
(
'缺少必要参数123'
);
public
function
upload_img
()
{
if
(
$this
->
request
->
isAjax
())
{
$img
=
$this
->
request
->
param
(
'img'
);
$top
=
$this
->
request
->
param
(
'top'
);
if
(
$img
)
{
$img_url
=
$this
->
base64_image_content
(
$img
,
'./upload'
);
$new_img
=
Image
::
open
(
'./upload/'
.
$img_url
);
$width
=
$new_img
->
width
();
$height
=
$new_img
->
height
();
$new_img
->
thumb
(
$width
,
$height
-
intval
(
$top
)
*
2
,
5
);
$new_img
->
save
(
'./upload/'
.
$img_url
);
$this
->
success
(
'成功'
,
''
,
cmf_get_asset_url
(
$img_url
));
}
}
$indentModel
=
new
IndentModel
();
$data
=
$indentModel
->
findData
([
'id'
=>
$indent_id
]);
if
(
$data
[
'is_courier'
]
==
1
){
if
(
empty
(
$param
[
'name'
])
||
empty
(
$param
[
'region'
])
||
empty
(
$param
[
'school'
])
||
empty
(
$param
[
'grade_class'
])
||
empty
(
$param
[
'phone'
])){
$this
->
error
(
'缺少必要参数'
);
}
/**
* [将Base64图片转换为本地图片并保存]
* @E-mial wuliqiang_aa@163.com
* @TIME 2017-04-07
* @WEB http://blog.iinu.com.cn
* @param [Base64] $base64_image_content [要保存的Base64]
* @param [目录] $path [要保存的路径]
*/
private
function
base64_image_content
(
$base64_image_content
,
$path
){
//匹配出图片的格式
if
(
preg_match
(
'/^(data:\s*image\/(\w+);base64,)/'
,
$base64_image_content
,
$result
)){
$type
=
$result
[
2
];
$file_path
=
"order_img/"
;
$new_file
=
$path
.
"/"
.
$file_path
;
if
(
!
file_exists
(
$new_file
)){
//检查是否有该文件夹,如果没有就创建,并给予最高权限
mkdir
(
$new_file
,
0700
);
}
$grade_class
=
explode
(
'-'
,
$param
[
'grade_class'
]);
$arr
[
'name'
]
=
$param
[
'name'
];
$arr
[
'phone'
]
=
$param
[
'phone'
];
$arr
[
'region'
]
=
$param
[
'region'
];
$arr
[
'school'
]
=
$param
[
'school'
];
$arr
[
'grade'
]
=
$grade_class
[
0
];
$arr
[
'class'
]
=
$grade_class
[
1
];
$result
=
$indentModel
->
updateData
([
'id'
=>
$indent_id
],
$arr
);
}
else
if
(
$data
[
'is_courier'
]
==
2
){
if
(
empty
(
$param
[
'name'
])
||
empty
(
$param
[
'phone'
])
||
empty
(
$param
[
'region'
])
||
empty
(
$param
[
'region_detail'
])){
$this
->
error
(
'缺少必要参数123'
);
$new_file
=
$new_file
.
cmf_get_current_user_id
()
.
".
{
$type
}
"
;
if
(
file_put_contents
(
$new_file
,
base64_decode
(
str_replace
(
$result
[
1
],
''
,
$base64_image_content
)))){
return
$file_path
.
cmf_get_current_user_id
()
.
".
{
$type
}
"
;
}
else
{
return
false
;
}
$arr
[
'name'
]
=
$param
[
'name'
];
$arr
[
'phone'
]
=
$param
[
'phone'
];
$arr
[
'region'
]
=
$param
[
'region'
];
$arr
[
'region_detail'
]
=
$param
[
'region_detail'
];
$result
=
$indentModel
->
updateData
([
'id'
=>
$indent_id
],
$arr
);
}
else
{
return
false
;
}
$this
->
success
(
'SUCCESS'
);
}
}
\ No newline at end of file
...
...
app/portal/controller/OrderSalesmanController_修改.php
0 → 100644
查看文件 @
fa05a6d
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/6/9
* Time: 15:34
*/
namespace
app\portal\controller
;
use
app\portal\model\AddressModel
;
use
app\portal\model\IndentGoodsModel
;
use
app\portal\model\IndentModel
;
use
cmf\controller\WeChatBaseController
;
use
think\Db
;
class
OrderSalesmanController
extends
WeChatBaseController
{
protected
$user_id
;
protected
$beforeActionList
=
[
'check'
=>
[
'except'
=>
'getGradeClass'
],
];
protected
function
check
()
{
$user_id
=
cmf_get_current_user_id
();
$this
->
user_id
=
$user_id
;
$my_user
=
Db
::
name
(
'my_user'
)
->
where
([
'uid'
=>
$user_id
])
->
find
();
if
(
empty
(
$my_user
)){
$this
->
error
(
'查无此人'
,
''
,
''
,
''
);
}
if
(
$my_user
[
'status'
]
!=
2
){
$this
->
error
(
'您还不是业务员那'
,
''
,
''
,
''
);
}
}
public
function
get_all
(){
$param
=
$this
->
request
->
param
();
if
(
!
empty
(
$param
[
'is_courier'
])){
$where
[
'is_courier'
]
=
[
'eq'
,
$param
[
'is_courier'
]];
}
$user_id
=
$this
->
user_id
;
$where
[
'salesman_uid'
]
=
[
'eq'
,
$user_id
];
$where
[
'indent_type'
]
=
[
'eq'
,
2
];
$where
[
'state'
]
=
[
'neq'
,
4
];
$indentModel
=
new
IndentModel
();
$data
=
$indentModel
->
selectData
(
$where
);
$indentGoodsModel
=
new
IndentGoodsModel
();
foreach
(
$data
as
$key
=>
$vo
){
$indent_goods
=
$indentGoodsModel
->
selectData
([
'indent_id'
=>
$vo
[
'id'
]]);
$data
[
$key
][
'indent_goods'
]
=
$indent_goods
;
//判断订单是不是平台订单
if
(
$vo
[
'indent_type'
]
==
1
){
$data
[
$key
][
'dizhi'
]
=
Db
::
name
(
'address'
)
->
where
(
'id'
,
$vo
[
'indent_address'
])
->
find
();
}
}
$school
=
Db
::
name
(
'school'
)
->
where
(
'uid'
,
$user_id
)
->
order
(
'create_time desc'
)
->
select
()
->
toArray
();
if
(
count
(
$school
)
!=
0
){
foreach
(
$school
as
$key
=>
$val
){
$schools
[
$key
][
'value'
]
=
$val
[
'id'
];
$schools
[
$key
][
'text'
]
=
$val
[
'school'
];
}
$this
->
assign
(
'school'
,
json_encode
(
$schools
));
}
else
{
$this
->
assign
(
'school'
,
''
);
}
$this
->
assign
(
'data'
,
$data
);
return
$this
->
fetch
();
}
public
function
getGradeClass
(){
$school_id
=
$this
->
request
->
param
(
'school_id'
,
0
,
'intval'
);
if
(
empty
(
$school_id
)){
$this
->
error
(
'缺少必要参数'
);
}
$grade
=
Db
::
name
(
'grade_class'
)
->
where
([
'school_id'
=>
$school_id
])
->
select
()
->
toArray
();
foreach
(
$grade
as
$key
=>
$g
){
$class
=
explode
(
'-'
,
$g
[
'class'
]);
$grade
[
$key
][
'start'
]
=
$class
[
0
];
$grade
[
$key
][
'end'
]
=
$class
[
1
];
}
$this
->
success
(
'SUCCESS'
,
''
,
$grade
);
}
public
function
getOrderSalesman
(){
$param
=
$this
->
request
->
param
();
if
(
!
empty
(
$param
[
'school'
])){
$where
[
'school'
]
=
[
'eq'
,
$param
[
'school'
]];
}
if
(
!
empty
(
$param
[
'grade'
])){
$param
[
'grade'
]
=
explode
(
' - '
,
$param
[
'grade'
]);
$where
[
'grade'
]
=
[
'eq'
,
$param
[
'grade'
][
0
]];
$where
[
'class'
]
=
[
'eq'
,
$param
[
'grade'
][
1
]];
}
if
(
!
empty
(
$param
[
'state'
])){
$where
[
'state'
]
=
[
'eq'
,
$param
[
'state'
]];
}
else
{
$where
[
'state'
]
=
[
'neq'
,
4
];
}
if
(
!
empty
(
$param
[
'is_courier'
])){
$where
[
'is_courier'
]
=
[
'eq'
,
$param
[
'is_courier'
]];
}
else
{
$where
[
'is_courier'
]
=
[
'eq'
,
1
];
}
$user_id
=
$this
->
user_id
;
$where
[
'salesman_uid'
]
=
[
'eq'
,
$user_id
];
$where
[
'indent_type'
]
=
[
'eq'
,
2
];
$indentModel
=
new
IndentModel
();
$data
=
$indentModel
->
selectData
(
$where
);
$indentGoodsModel
=
new
IndentGoodsModel
();
foreach
(
$data
as
$key
=>
$vo
){
$indent_goods
=
$indentGoodsModel
->
selectData
([
'indent_id'
=>
$vo
[
'id'
]]);
$data
[
$key
][
'indent_goods'
]
=
$indent_goods
;
if
(
$vo
[
'is_courier'
]
==
2
){
$address
=
Db
::
name
(
'address'
)
->
where
([
'id'
=>
$vo
[
'indent_address'
]])
->
find
();
$data
[
$key
][
'region'
]
=
$address
[
'region'
];
$data
[
$key
][
'detailed'
]
=
$address
[
'detailed'
];
$data
[
$key
][
'phone'
]
=
$address
[
'phone'
];
}
}
$this
->
success
(
'SUCCESS'
,
''
,
$data
);
}
public
function
send
(){
$param
=
$this
->
request
->
param
();
if
(
empty
(
$param
[
'is_courier'
])){
$this
->
error
(
'缺少必要参数1'
);
}
if
(
$param
[
'is_courier'
]
==
1
){
if
(
empty
(
$param
[
'start_time'
])){
$this
->
error
(
'缺少必要参数2'
);
}
// if(empty($param['end_time'])){
// $this->error('缺少必要参数3');
// }
}
else
if
(
$param
[
'is_courier'
]
==
2
){
if
(
empty
(
$param
[
'logistic_name'
])){
$this
->
error
(
'缺少必要参数4'
);
}
if
(
empty
(
$param
[
'logistic_code'
])){
$this
->
error
(
'缺少必要参数5'
);
}
}
if
(
empty
(
$param
[
'indent_id'
])){
$this
->
error
(
'缺少必要参数6'
);
}
$where
[
'id'
]
=
[
'eq'
,
$param
[
'indent_id'
]];
$indentModel
=
new
IndentModel
();
$indent
=
$indentModel
->
findData
(
$where
);
if
(
empty
(
$indent
)){
$this
->
error
(
'查询为空'
);
}
if
(
$indent
[
'state'
]
!=
2
){
$this
->
error
(
'订单不是待支付状态'
);
}
$arr
=
[];
if
(
$param
[
'is_courier'
]
==
1
){
$arr
[
'start_time'
]
=
$param
[
'start_time'
];
// $arr['end_time'] = $param['end_time'];
}
else
if
(
$param
[
'is_courier'
]
==
2
){
$arr
[
'logistic_name'
]
=
$param
[
'logistic_name'
];
$arr
[
'logistic_code'
]
=
$param
[
'logistic_code'
];
}
$arr
[
'state'
]
=
5
;
$result
=
$indentModel
->
updateData
(
$where
,
$arr
);
////
$this
->
success
(
'发货成功'
);
}
public
function
send_all
(){
$param
=
$this
->
request
->
param
();
if
(
empty
(
$param
[
'start_time2'
])
||
empty
(
$param
[
'indent_ids'
])){
$this
->
error
(
'缺少必要参数'
);
}
$indent_ids
=
explode
(
','
,
$param
[
'indent_ids'
]);
$data
[
'start_time'
]
=
$param
[
'start_time2'
];
// $data['end_time'] = $param['end_time2'];
$data
[
'state'
]
=
5
;
$indentModel
=
new
IndentModel
();
$result
=
$indentModel
->
updateData
([
'id'
=>
[
'in'
,
$indent_ids
]],
$data
);
if
(
empty
(
$result
)){
$this
->
error
(
'更新失败'
);
}
else
{
$this
->
success
(
'发货成功'
);
}
}
public
function
get_one
(){
$id
=
$this
->
request
->
param
(
'id'
,
0
,
'intval'
);
if
(
empty
(
$id
)){
$this
->
error
(
'缺少必参数'
,
''
,
''
,
''
);
}
$indentModel
=
new
IndentModel
();
$indent
=
$indentModel
->
findData
([
'id'
=>
$id
])
->
toArray
();
if
(
empty
(
$indent
)){
$this
->
error
(
'查询为空'
);
}
if
(
$indent
[
'is_courier'
]
==
1
){
$school
=
Db
::
name
(
'school'
)
->
where
([
'region'
=>
$indent
[
'region'
],
'uid'
=>
$indent
[
'salesman_uid'
]])
->
select
();
$arr1
=
[];
foreach
(
$school
as
$key
=>
$s
){
$arr1
[
$key
][
'value'
]
=
$s
[
'id'
];
$arr1
[
$key
][
'text'
]
=
$s
[
'school'
];
}
$school_id
=
Db
::
name
(
'school'
)
->
where
([
'region'
=>
$indent
[
'region'
],
'uid'
=>
$indent
[
'salesman_uid'
]])
->
value
(
'id'
);
$grade
=
Db
::
name
(
'grade_class'
)
->
where
([
'school_id'
=>
$school_id
])
->
select
()
->
toArray
();
foreach
(
$grade
as
$key
=>
$g
){
$class
=
explode
(
'-'
,
$g
[
'class'
]);
$grade
[
$key
][
'start'
]
=
$class
[
0
];
$grade
[
$key
][
'end'
]
=
$class
[
1
];
}
$this
->
assign
(
'school'
,
json_encode
(
$arr1
));
$this
->
assign
(
'grade'
,
$grade
);
}
$indentGoodsModel
=
new
IndentGoodsModel
();
$indent_goods
=
$indentGoodsModel
->
selectData
([
'indent_id'
=>
$indent
[
'id'
]]);
if
(
!
empty
(
$indent
[
'indent_address'
])){
$addressModel
=
new
AddressModel
();
$indent_address
=
$addressModel
->
findData
([
'id'
=>
$indent
[
'indent_address'
]])
->
toArray
();
$indent
[
'indent_address'
]
=
$indent_address
;
}
$indent
[
'indent_goods'
]
=
$indent_goods
;
$this
->
assign
(
'data'
,
$indent
);
return
$this
->
fetch
();
}
public
function
take_all
(){
$indent_ids
=
$this
->
request
->
param
(
'indent_ids'
);
$data
[
'state'
]
=
3
;
$indent_ids
=
explode
(
','
,
$indent_ids
);
$where
[
'id'
]
=
[
'in'
,
$indent_ids
];
$indentModel
=
new
IndentModel
();
$result
=
$indentModel
->
updateData
(
$where
,
$data
);
if
(
empty
(
$result
)){
$this
->
error
(
'更新失败'
);
}
else
{
$this
->
success
(
'更新成功'
);
}
}
public
function
take_one
(){
$indent_id
=
$this
->
request
->
param
(
'indent_id'
);
$data
[
'state'
]
=
3
;
$where
[
'id'
]
=
[
'eq'
,
$indent_id
];
$indentModel
=
new
IndentModel
();
$result
=
$indentModel
->
updateData
(
$where
,
$data
);
if
(
empty
(
$result
)){
$this
->
error
(
'更新失败'
);
}
else
{
$this
->
success
(
'更新成功'
);
}
}
public
function
updatePost
(){
$param
=
$this
->
request
->
param
();
$indent_id
=
$this
->
request
->
param
(
'indent_id'
,
0
,
'intval'
);
if
(
empty
(
$indent_id
)){
$this
->
error
(
'缺少必要参数123'
);
}
$indentModel
=
new
IndentModel
();
$data
=
$indentModel
->
findData
([
'id'
=>
$indent_id
]);
if
(
$data
[
'is_courier'
]
==
1
){
if
(
empty
(
$param
[
'name'
])
||
empty
(
$param
[
'region'
])
||
empty
(
$param
[
'school'
])
||
empty
(
$param
[
'grade_class'
])
||
empty
(
$param
[
'phone'
])){
$this
->
error
(
'缺少必要参数'
);
}
$grade_class
=
explode
(
'-'
,
$param
[
'grade_class'
]);
$arr
[
'name'
]
=
$param
[
'name'
];
$arr
[
'phone'
]
=
$param
[
'phone'
];
$arr
[
'region'
]
=
$param
[
'region'
];
$arr
[
'school'
]
=
$param
[
'school'
];
$arr
[
'grade'
]
=
$grade_class
[
0
];
$arr
[
'class'
]
=
$grade_class
[
1
];
$result
=
$indentModel
->
updateData
([
'id'
=>
$indent_id
],
$arr
);
}
else
if
(
$data
[
'is_courier'
]
==
2
){
if
(
empty
(
$param
[
'name'
])
||
empty
(
$param
[
'phone'
])
||
empty
(
$param
[
'region'
])
||
empty
(
$param
[
'region_detail'
])){
$this
->
error
(
'缺少必要参数123'
);
}
$arr
[
'name'
]
=
$param
[
'name'
];
$arr
[
'phone'
]
=
$param
[
'phone'
];
$arr
[
'region'
]
=
$param
[
'region'
];
$arr
[
'region_detail'
]
=
$param
[
'region_detail'
];
$result
=
$indentModel
->
updateData
([
'id'
=>
$indent_id
],
$arr
);
}
$this
->
success
(
'SUCCESS'
);
}
}
\ No newline at end of file
...
...
public/themes/simpleboot3/portal/order_salesman/get_all.html
查看文件 @
fa05a6d
...
...
@@ -194,7 +194,7 @@
</style>
</head>
<body
style=
"cursor:pointer;
background: #fff
"
>
<body
style=
"cursor:pointer;"
>
<!--学校弹窗-->
...
...
@@ -398,9 +398,6 @@
<div
class=
"log_three_select_one log_three_select_btn clear "
>
重置
</div>
<!--<div class="log_three_select_one log_three_select_btn html2canvas">-->
<!--生成图片-->
<!--</div>-->
<input
type=
"hidden"
id=
"school"
value=
""
/>
<input
type=
"hidden"
id=
"grade"
value=
""
/>
<input
type=
"hidden"
id=
"is_courier"
value=
"1"
/>
...
...
@@ -416,10 +413,13 @@
</if>
</foreach>
<div
class=
"shuju_zongshu"
>
搜索结果为
<span
class=
"count"
>
{:count($arr2)}
</span>
条
</div>
<div
class=
"view_img"
style=
"padding: 0 0.3rem"
>
<div
class=
"log_three_select_one log_three_select_btn down"
href=
"javascript:;"
id=
"view_cavans"
>
查看订单截图
</div>
</div>
<!-- 列表内容 -->
<div>
<div
id=
"orderlist"
style=
"background: #fff;"
>
<!--未发货-->
<div
class=
"log_three_list_contant"
style=
"display: block;
background: rgba(359, 295, 265, 1)
"
>
<div
class=
"log_three_list_contant"
style=
"display: block;"
>
<foreach
name=
"$data"
item=
"vo"
>
<if
condition=
"$vo.state eq 2"
>
<php>
$arr1[] = $vo;
</php>
...
...
@@ -711,6 +711,8 @@
<script
src=
"__TMPL__/public/assets/js/mui.min.js"
></script>
<script
src=
"__TMPL__/public/assets/js/mui.picker.min.js"
></script>
<script
src=
"__TMPL__/public/assets/js/city.data-3.js"
></script>
<script
src=
"https://cdn.bootcss.com/html2canvas/0.5.0-beta4/html2canvas.js"
></script>
<script
src=
"http://res.wx.qq.com/open/js/jweixin-1.4.0.js"
></script>
<script>
var
expresspicker
=
new
mui
.
PopPicker
();
...
...
@@ -852,6 +854,11 @@
var
tabIndex
=
$
(
this
).
index
();
$
(
this
).
addClass
(
"log_three_tab_two"
).
addClass
(
"word_color"
).
addClass
(
'aaa'
).
siblings
().
removeClass
(
"log_three_tab_two"
).
removeClass
(
"word_color"
).
removeClass
(
"aaa"
);
$
(
'.log_three_list_contant'
).
eq
(
tabIndex
).
css
(
'display'
,
'block'
).
siblings
().
css
(
'display'
,
'none'
);
if
(
tabIndex
==
0
)
{
$
(
'.view_img'
).
css
(
'display'
,
'block'
);
}
else
{
$
(
'.view_img'
).
css
(
'display'
,
'none'
);
}
search
();
$
(
'.log_three_fixed_left_one img'
).
attr
(
'src'
,
"__TMPL__/public/assets/images/fangkuang.png"
)
});
...
...
@@ -874,12 +881,10 @@
var
length
=
$
(
".log_three_list_contant"
).
eq
(
index
).
find
(
'.log_three_list_top_lo img'
).
length
;
var
l
=
0
;
for
(
var
n
=
0
;
n
<
length
;
n
++
)
{
console
.
log
(
$
(
".log_three_list_contant"
).
eq
(
index
).
find
(
'.log_three_list_top_lo img'
).
eq
(
n
).
attr
(
'src'
));
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"
)
{
l
++
}
}
console
.
log
(
'@@@@@'
+
l
+
'@@@@@'
+
length
);
if
(
l
==
length
)
{
$
(
'.log_three_fixed_left_one img'
).
attr
(
'src'
,
"__TMPL__/public/assets/images/xuanzhong (1).png"
)
}
else
{
...
...
@@ -936,7 +941,6 @@
});
$
(
".tx_mask_kuaidi .get_Go"
).
click
(
function
()
{
var
index
=
$
(
this
).
index
();
console
.
log
(
$
(
this
).
text
());
$
(
this
).
addClass
(
'there_unActive'
).
siblings
().
removeClass
(
'there_unActive'
);
$
(
'.get_Gofo'
).
text
(
$
(
this
).
text
()).
css
(
"color"
,
"#333"
);
$
(
".tx_mask_kuaidi"
).
hide
();
...
...
@@ -984,7 +988,6 @@
var
index
=
$
(
'.log_three_tab_top div'
).
index
(
$
(
'.aaa'
));
if
(
data
.
code
==
1
)
{
var
result
=
data
.
data
;
console
.
log
(
"**********"
+
result
.
length
);
if
(
result
.
length
==
0
)
{
var
html
=
"<div style=\"text-align: center;width: 100%;height:100%;margin:0 auto;\">暂无数据</div>"
;
}
else
{
...
...
@@ -1113,7 +1116,6 @@
" </div>\n"
+
indent_goods_html
+
"</a>"
+
"\t\t\t\t\t\t<div class=\"log_three_bottom_btn\">"
+
html_bottom
+
"</div></div>"
;
}
else
if
(
result
[
i
].
is_courier
==
2
)
{
console
.
log
(
"++"
+
html
);
html
+=
"<div class=\"log_three_list order_"
+
result
[
i
].
id
+
"\">\n"
+
"\t\t\t\t\t\t\t<div class=\"log_three_list_top\">\n"
+
"\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_left\">\n"
+
...
...
@@ -1138,9 +1140,7 @@
"\t\t\t\t\t\t<div class=\"log_three_bottom_btn\">"
+
html_bottom
+
"</div></div>"
;
}
}
console
.
log
(
html
);
$
(
'.count'
).
html
(
i
);
console
.
log
(
'@@@@@@@@@@'
+
index
);
$
(
'.log_three_list_contant'
).
eq
(
index
).
html
(
html
);
update
();
}
else
{
...
...
@@ -1208,7 +1208,6 @@
var
start_time
=
$
(
'#start_time'
).
val
();
// var end_time = $('#end_time').val();
var
logistic_name
=
$
(
'#logistic_name'
).
val
();
console
.
log
(
logistic_name
);
var
logistic_code
=
$
(
'#logistic_code'
).
val
();
var
indent_id
=
$
(
this
).
attr
(
'data-indent-id'
);
if
(
is_courier
==
1
)
{
...
...
@@ -1327,9 +1326,7 @@
'indent_ids'
:
indent_ids
},
success
:
function
(
res
)
{
console
.
log
(
indent_ids
);
indent_ids
=
indent_ids
.
split
(
","
);
console
.
log
(
indent_ids
)
if
(
res
.
code
==
1
)
{
$
.
each
(
indent_ids
,
function
(
key
,
indent_id
)
{
$
(
'.order_'
+
indent_id
).
remove
();
...
...
@@ -1389,7 +1386,6 @@
//统一配送选择时间
$
(
".tongyi_start_time"
).
click
(
function
()
{
dtpicker
.
show
(
function
(
e
)
{
console
.
log
(
e
);
$
(
'.tongyi_start_time'
).
text
(
e
.
text
);
$
(
'#start_time'
).
val
(
e
.
text
);
$
(
'.tongyi_start_time'
).
css
(
'color'
,
'#333333'
);
...
...
@@ -1398,7 +1394,6 @@
$
(
".tongyi_start_time2"
).
click
(
function
()
{
dtpicker
.
show
(
function
(
e
)
{
console
.
log
(
e
);
$
(
'.tongyi_start_time2'
).
text
(
e
.
text
);
$
(
'#start_time2'
).
val
(
e
.
text
);
$
(
'.tongyi_start_time2'
).
css
(
'color'
,
'#333333'
);
...
...
@@ -1409,50 +1404,45 @@
window
.
event
?
(
window
.
event
.
cancelBubble
=
true
)
:
e
.
stopPropagation
();
}
</script>
<script
src=
"https://cdn.bootcss.com/html2canvas/0.5.0-beta4/html2canvas.js"
></script>
<script>
$
(
".html2canvas"
).
click
(
function
()
{
// html2canvas($(".log_three_list_contant")).then(function (canvas) {
// var imgUri = canvas.toDataURL("image/png").replace("image/png", "image/octet-stream"); // 获取生成的图片的url
// window.location.href = imgUri; // 下载图片
// });
alert
(
132
);
html2canvas
(
$
(
'.log_three_list_contant'
),
{
onrendered
:
function
(
canvas
)
{
var
data
=
canvas
.
toDataURL
(
"image/jpg"
,
"image/octet-stream"
);
//生成的格式
//data就是生成的base64码啦
console
.
log
(
data
);
downloadFile
(
'ceshi.png'
,
data
);
}
var
img_url
=
''
;
var
k
=
$
(
"#orderlist"
).
offset
().
top
;
var
canvas2
=
document
.
createElement
(
"canvas"
);
let
_canvas
=
document
.
querySelector
(
'#orderlist'
);
var
w
=
parseInt
(
window
.
getComputedStyle
(
_canvas
).
width
);
var
h
=
parseInt
(
window
.
getComputedStyle
(
_canvas
).
height
);
//将canvas画布放大若干倍,然后盛放在较小的容器内,就显得不模糊了
canvas2
.
width
=
w
*
2
;
canvas2
.
height
=
(
h
+
400
)
*
2
;
canvas2
.
style
.
width
=
w
+
"px"
;
canvas2
.
style
.
height
=
h
+
"px"
;
//可以按照自己的需求,对context的参数修改,translate指的是偏移量
// var context = canvas.getContext("2d");
// context.translate(0,0);
var
context
=
canvas2
.
getContext
(
"2d"
);
context
.
scale
(
2
,
2
);
html2canvas
(
document
.
querySelector
(
'#orderlist'
),
{
canvas
:
canvas2
}).
then
(
function
(
canvas
)
{
//document.body.appendChild(canvas);
//canvas转换成url,然后利用a标签的download属性,直接下载,绕过上传服务器再下载
$
.
ajax
({
type
:
'POST'
,
url
:
"{:url('upload_img')}"
,
data
:
{
img
:
canvas
.
toDataURL
(),
top
:
k
},
dataType
:
'json'
,
success
:
function
(
res
)
{
img_url
=
res
.
data
}
});
// document.querySelector(".down").setAttribute('href', canvas.toDataURL());
});
function
downloadFile
(
fileName
,
content
)
{
let
aLink
=
document
.
createElement
(
'a'
);
let
blob
=
this
.
base64ToBlob
(
content
);
//new Blob([content]);
let
evt
=
document
.
createEvent
(
"HTMLEvents"
);
evt
.
initEvent
(
"click"
,
true
,
true
);
//initEvent 不加后两个参数在FF下会报错 事件类型,是否冒泡,是否阻止浏览器的默认行为
aLink
.
download
=
fileName
;
aLink
.
href
=
URL
.
createObjectURL
(
blob
);
// aLink.dispatchEvent(evt);
aLink
.
click
()
}
//base64转blob
function
base64ToBlob
(
code
)
{
let
parts
=
code
.
split
(
';base64,'
);
let
contentType
=
parts
[
0
].
split
(
':'
)[
1
];
let
raw
=
window
.
atob
(
parts
[
1
]);
let
rawLength
=
raw
.
length
;
let
uInt8Array
=
new
Uint8Array
(
rawLength
);
$
(
'#view_cavans'
).
click
(
function
(){
wx
.
previewImage
({
current
:
img_url
,
// 当前显示图片的http链接
urls
:
[
img_url
]
// 需要预览的图片http链接列表
});
})
for
(
let
i
=
0
;
i
<
rawLength
;
++
i
)
{
uInt8Array
[
i
]
=
raw
.
charCodeAt
(
i
);
}
return
new
Blob
([
uInt8Array
],
{
type
:
contentType
});
}
</script>
</body>
...
...
public/themes/simpleboot3/portal/order_salesman/get_all——修改.html
0 → 100644
查看文件 @
fa05a6d
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html;charset=UTF-8"
/>
<meta
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
name=
"viewport"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"ie=edge"
/>
<title>
学考无忧-订单管理
</title>
<link
rel=
"stylesheet"
href=
"__TMPL__/public/assets/css/mui.min.css"
/>
<link
rel=
"stylesheet"
href=
"__TMPL__/public/assets/css/mui.picker.min.css"
/>
<link
rel=
"stylesheet"
href=
"__TMPL__/public/assets/css/reset.css"
/>
<link
rel=
"stylesheet"
href=
"__TMPL__/public/assets/css/log.css"
/>
<style>
.tx_masktwo
{
display
:
none
;
z-index
:
2
;
width
:
100%
;
height
:
100%
;
position
:
fixed
;
background-color
:
rgba
(
0
,
0
,
0
,
0.5
);
}
.take_one
{
margin-top
:
0.3rem
;
width
:
1.6rem
;
height
:
0.48rem
;
background
:
linear-gradient
(
328deg
,
rgba
(
255
,
78
,
0
,
1
)
0%
,
rgba
(
255
,
157
,
45
,
1
)
100%
);
box-shadow
:
0
0.06rem
0.12rem
rgba
(
255
,
128
,
0
,
0.24
);
opacity
:
1
;
border-radius
:
0.08rem
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
font-size
:
0.26rem
;
font-weight
:
400
;
color
:
rgba
(
255
,
255
,
255
,
1
);
}
.tx_mask_class
{
display
:
none
;
z-index
:
3
;
width
:
100%
;
height
:
100%
;
position
:
fixed
;
background-color
:
rgba
(
0
,
0
,
0
,
0.5
);
}
.tx_maskCon_class
{
width
:
100%
;
height
:
5.16rem
;
background
:
#fff
;
position
:
fixed
;
bottom
:
0
;
}
.three_model_class_name
{
height
:
0.36rem
;
margin
:
0.08rem
;
font-size
:
0.24rem
;
font-weight
:
400
;
color
:
#666666
;
opacity
:
1
;
padding
:
0.2rem
0
;
line-height
:
0
;
border-left
:
none
;
border-right
:
none
}
.get_Go
{
height
:
0.36rem
;
margin
:
0.08rem
;
font-size
:
0.24rem
;
font-weight
:
400
;
cursor
:
pointer
;
color
:
#666666
;
opacity
:
1
;
padding
:
0.2rem
0
;
line-height
:
0
;
border-left
:
none
;
border-right
:
none
;
}
.mui-poppicker-header
,
.mui-picker
{
background-color
:
white
;
}
.mui-btn-blue
,
.mui-btn-primary
,
input
[
type
=
submit
]
{
background-color
:
#FF7700
;
border
:
0
;
}
.mui-pciker-list
li
.highlight
{
color
:
#FF7700
;
}
.mui-dtpicker-header
,
.mui-dtpicker-title
h5
{
background-color
:
white
;
}
.dingdan_lianxi_ren
{
font-size
:
0.28rem
;
cursor
:
pointer
;
font-family
:
PingFang
SC
;
font-weight
:
400
;
color
:
rgba
(
102
,
102
,
102
,
1
);
opacity
:
1
;
}
/*.dingdan_detail {*/
/*padding-top: 0.22rem;*/
/*}*/
.dingdan_detail_hao
{
font-size
:
0.28rem
;
cursor
:
pointer
;
font-family
:
PingFang
SC
;
font-weight
:
400
;
color
:
rgba
(
102
,
102
,
102
,
1
);
opacity
:
1
;
margin-top
:
0.2rem
;
}
.right_dingdan
{
width
:
5.6rem
;
margin-left
:
0.2rem
;
}
.right_dingdan_top
{
display
:
flex
;
justify-content
:
space-between
;
display
:
-webkit-box
;
/* Chrome 4+, Safari 3.1, iOS Safari 3.2+ */
display
:
-moz-box
;
/* Firefox 17- */
display
:
-webkit-flex
;
/* Chrome 21+, Safari 6.1+, iOS Safari 7+, Opera 15/16 */
display
:
-moz-flex
;
/* Firefox 18+ */
display
:
-ms-flexbox
;
/* IE 10 */
display
:
flex
;
/* Chrome 29+, Firefox 22+, IE 11+, Opera 12.1/17/18, Android 4.4+ */
justify-content
:
space-between
;
-webkit-flex-justify-content
:
space-between
;
-moz-box-justify-content
:
space-between
;
-ms-flexbox-justify-content
:
space-between
;
-webkit-flexalign-align-items
:
center
;
-moz-box-align-items
:
center
;
-ms-flexbox-align-items
:
center
;
}
.right_dingdan_center
{
text-align
:
right
;
}
.right_dingdan_one
{
font-size
:
0.26rem
;
cursor
:
pointer
;
font-weight
:
400
;
color
:
rgba
(
51
,
51
,
51
,
1
);
opacity
:
1
;
}
.right_dingdan_two
{
font-size
:
0.34rem
;
font-weight
:
400
;
cursor
:
pointer
;
line-height
:
25px
;
color
:
rgba
(
51
,
51
,
51
,
1
);
opacity
:
1
;
}
.shuju_zongshu
{
padding-left
:
0.4rem
;
font-size
:
0.28rem
;
font-weight
:
600
;
color
:
#333
;
border-radius
:
0.08rem
;
}
.log_three_bottom2
{
margin-top
:
0.3rem
;
cursor
:
pointer
;
width
:
1.6rem
;
height
:
0.48rem
;
background
:
linear-gradient
(
328deg
,
rgba
(
255
,
78
,
0
,
1
)
0%
,
rgba
(
255
,
157
,
45
,
1
)
100%
);
box-shadow
:
0
0.06rem
0.12rem
rgba
(
255
,
128
,
0
,
0.24
);
opacity
:
1
;
border-radius
:
0.08rem
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
font-size
:
0.26rem
;
font-weight
:
400
;
color
:
rgba
(
255
,
255
,
255
,
1
);
}
</style>
</head>
<body
style=
"cursor:pointer;background: #fff"
>
<!--学校弹窗-->
<div
class=
"tx_mask_school"
onclick=
"$(this).hide()"
>
<div
class=
"tx_maskCon_school"
onclick=
"zZFun(this)"
>
<div
class=
"three_model_school"
>
<div
class=
"three_model_school_title"
>
选择学校
</div>
<div
class=
"three_model_school_data there_university"
style=
"display: block;"
>
</div>
</div>
</div>
</div>
<!--班级弹窗-->
<div
class=
"tx_mask_class"
onclick=
"$(this).hide()"
>
<div
class=
"tx_maskCon_class"
onclick=
"zZFun(this)"
>
<div
class=
"three_model_school"
>
<div
class=
"three_model_school_title"
>
选择班级
</div>
<div
class=
"three_model_school_data there_university grade"
style=
"display: block;"
>
</div>
</div>
</div>
</div>
<!--统一配送-->
<!--<div class="tx_mask_tongyi" onclick="$(this).hide()">-->
<!--<div class="tx_maskCon_tongyi" onclick="zZFun(this)">-->
<!--<div class="three_model_school">-->
<!--<div class="three_model_school_data" style="display: block;">-->
<!--<div class="three_modal_kuaidi_name there_unActive" data-id="1">统一配送</div>-->
<!--<div class="three_modal_kuaidi_name" data-id="2">快递配送</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--选择快递-->
<!--<div class="tx_mask_kuaidi" onclick="$(this).hide()">-->
<!--<div class="tx_maskCon_school" onclick="zZFun(this)">-->
<!--<div class="three_model_school">-->
<!--<div class="three_model_school_title">-->
<!--选择快递-->
<!--</div>-->
<!--<div>-->
<!--<div class="three_model_school_data" style="display: block;">-->
<!--<div class="get_Go" data-name="SF">顺丰快递</div>-->
<!--<div class="get_Go" data-name="YTO">圆通快递</div>-->
<!--<div class="get_Go" data-name="ZTO">中通快递</div>-->
<!--<div class="get_Go there_unActive" data-name="STO">申通快递</div>-->
<!--<div class="get_Go" data-name="YD">韵达快递</div>-->
<!--<div class="get_Go" data-name="HHTT">天天快递</div>-->
<!--<div class="get_Go" data-name="HTKY">百世快递</div>-->
<!--<div class="get_Go" data-name="YZPY">邮政快递包裹</div>-->
<!--<div class="get_Go" data-name="EMS">EMS</div>-->
<!--<div class="get_Go" data-name="DBL">德邦快递</div>-->
<!--<div class="get_Go" data-name="ZJS">宅急送</div>-->
<!--<div class="get_Go" data-name="TNT">TNT快递</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div
class=
"tx_masktwo"
style=
"display: none;"
onclick=
"$(this).hide()"
>
<div
class=
"tx_maskCon"
onclick=
"zZFun(this)"
>
<div
class=
"tx_maskConImg"
>
<img
src=
"__TMPL__/public/assets/images/91.png"
alt=
""
/>
</div>
<div
class=
"tx_maskCon2"
>
<div
class=
"log_three_model"
>
<div
class=
"log_three_model_one time"
>
<div
class=
"log_three_model_left"
>
配送时间
</div>
<div
class=
"log_psong tongyi_start_time2"
style=
"color: #CCCCCC;"
>
请选择配送到达时间
</div>
<input
type=
"hidden"
id=
"start_time2"
value=
""
placeholder=
"请输入开配送时间"
/>
</div>
<!--<div class="log_three_model_one time">-->
<!--<div class="log_three_model_left">配送时间</div>-->
<!--<div class="log_psong">-->
<!--<input type="text" id="end_time2" value="" placeholder="请输入结束配送时间"/>-->
<!--</div>-->
<!--</div>-->
</div>
<!-- 确定 -->
<div
class=
"tx_maskOk confirm2"
data-is_courier=
""
data-id=
""
data-indent-id=
""
>
确定
</div>
</div>
</div>
</div>
<div
class=
"tx_maskone"
onclick=
"$(this).hide()"
>
<div
class=
"tx_maskCon"
onclick=
"zZFun(this)"
>
<div
class=
"tx_maskConImg"
>
<img
src=
"__TMPL__/public/assets/images/91.png"
alt=
""
/>
</div>
<div
class=
"tx_maskCon2"
>
<div
class=
"log_three_model"
>
<div
class=
"log_three_model_one time"
>
<div
class=
"log_three_model_left"
>
配送时间
</div>
<div
class=
"log_psong tongyi_start_time"
style=
"color: #CCCCCC;"
>
请选择配送到达时间
</div>
<input
type=
"hidden"
id=
"start_time"
value=
""
placeholder=
"请输入开配送时间"
/>
</div>
<!--<div class="log_three_model_one time">
<div class="log_three_model_left">配送时间</div>
<div class="log_psong">
<input type="text" id="end_time" value="" placeholder="请输入结束配送时间"/>
</div>
</div>-->
<!--<div class="log_three_model_one logistic">-->
<!--<div class="log_three_model_left">选择快递</div>-->
<!--<div class="log_psong log_psong_select">-->
<!--<div class="log_ps_title2 get_Gofo">请选择快递公司</div>-->
<!--<div class="log_ps_img">-->
<!--<img src="__TMPL__/public/assets/images/29.png"/>-->
<input
type=
"hidden"
id=
"logistic_name"
value=
""
placeholder=
"请选择快递公司"
/>
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div
class=
"log_three_model_one excompany logistic"
>
<div
class=
"log_three_model_left"
>
选择快递
</div>
<div
class=
"log_psong log_psong_select"
>
<div
class=
"log_ps_title excompany_word"
>
请选择
</div>
<div
class=
"log_ps_img"
>
<img
src=
"__TMPL__/public/assets/images/29.png"
/>
</div>
</div>
</div>
<div
class=
"log_three_model_one logistic"
style=
"padding-bottom: 0;"
>
<div
class=
"log_three_model_left"
style=
"margin-top: -0.3rem;"
>
快递单号
</div>
<div
class=
"log_three_model_right"
>
<input
type=
"text"
id=
"logistic_code"
placeholder=
"请输入快递单号"
/>
</div>
</div>
</div>
<!-- 确定 -->
<div
class=
"tx_maskOk confirm"
data-is_courier=
""
data-id=
""
data-indent-id=
""
>
确定
</div>
</div>
</div>
</div>
<div
class=
"log_top_co"
>
<!-- 顶部 -->
<div
class=
" order_top log_top_co order_tops"
>
<a
href=
"javascript:history.back(-1)"
>
<img
src=
"__TMPL__/public/assets/images/left.png"
alt=
""
/>
</a>
<p>
订单管理
</p>
</div>
</div>
<!-- tab切换 -->
<div
class=
"log_three_tab log_three_tab_top"
>
<div
class=
"log_three_tab_one log_three_tab_two word_color aaa"
data-state=
"2"
style=
"cursor: pointer"
>
未发货
</div>
<div
class=
"log_three_tab_one"
data-state=
"5"
style=
"cursor: pointer"
>
已发货
</div>
<div
class=
"log_three_tab_one"
data-state=
"3"
style=
"cursor: pointer"
>
已完成
</div>
</div>
<!-- 下拉框 -->
<div
class=
"log_three_select"
>
<!-- <div class="log_three_select_one log_three_select_school" style="cursor: pointer">
<div class="log_three_select_title log_three_select_school2">
请选择学校/班级
</div>
<div class="log_three_select_img">
<img src="__TMPL__/public/assets/images/75.png" alt=""/>
</div>
</div>-->
<div
class=
"log_three_select_one log_three_select_school2"
>
<div
class=
"log_three_select_title schools_word"
>
请选择学校
</div>
<!--<div class="log_three_select_img">-->
<!--<img src="__TMPL__/public/assets/images/75.png" alt="" />-->
<!--</div>-->
</div>
<div
class=
"log_three_select_one log_three_select_class2"
>
<div
class=
"log_three_select_title class_word"
>
请选择班级
</div>
<!--<div class="log_three_select_img">-->
<!--<img src="__TMPL__/public/assets/images/75.png" alt="" />-->
<!--</div>-->
</div>
<div
class=
"log_three_select_one log_three_select_peisong log_three_select_tongyi"
style=
"cursor: pointer"
>
<!--<div class="log_three_select_title log_three_select_contant">-->
<!--统一配送-->
<!--</div>-->
<div
class=
"log_three_select_title express_word"
>
请选择配送方式
</div>
<!--<div class="log_three_select_img">-->
<!--<img src="__TMPL__/public/assets/images/75.png" alt=""/>-->
<!--</div>-->
</div>
<div
class=
"log_three_select_one log_three_select_btn search"
>
搜索
</div>
<div
class=
"log_three_select_one log_three_select_btn clear "
>
重置
</div>
<!--<div class="log_three_select_one log_three_select_btn html2canvas">-->
<!--生成图片-->
<!--</div>-->
<input
type=
"hidden"
id=
"school"
value=
""
/>
<input
type=
"hidden"
id=
"grade"
value=
""
/>
<input
type=
"hidden"
id=
"is_courier"
value=
"1"
/>
</div>
<php>
$arr2 = [];
</php>
<foreach
name=
"$data"
item=
"vo"
>
<if
condition=
"$vo.state eq 2"
>
<php>
$arr2[] = $vo;
</php>
<elseif
condition=
"$vo.state eq 5"
/>
<php>
$arr5[] = $vo;
</php>
<elseif
condition=
"$vo.state eq 3"
/>
<php>
$arr3[] = $vo;
</php>
</if>
</foreach>
<div
class=
"shuju_zongshu"
>
搜索结果为
<span
class=
"count"
>
{:count($arr2)}
</span>
条
</div>
<!-- 列表内容 -->
<div>
<!--未发货-->
<div
class=
"log_three_list_contant"
style=
"display: block;background: rgba(359, 295, 265, 1)"
>
<foreach
name=
"$data"
item=
"vo"
>
<if
condition=
"$vo.state eq 2"
>
<php>
$arr1[] = $vo;
</php>
<div
class=
"log_three_list order_{$vo.id}"
>
<div
class=
"log_three_list_top"
>
<div
class=
"log_three_list_top_left"
>
<if
condition=
"$vo.is_courier eq 1"
>
<div
class=
"log_three_list_top_lo"
>
<img
src=
"__TMPL__/public/assets/images/fangkuang.png"
data-indent-id=
"{$vo['id']}"
alt=
""
/>
</div>
</if>
<div
class=
"log_three_list_top_lt"
>
<div
class=
"log_three_zhongbiao"
>
<img
src=
"__TMPL__/public/assets/images/52.png"
alt=
""
/>
</div>
<div
class=
"log_three_shijian"
>
{$vo['pay_time']}
</div>
</div>
</div>
<div
class=
"log_three_list_top_right"
>
<if
condition=
"$vo.state eq 2"
>
待发货
<elseif
condition=
"$vo.state eq 5"
/>
已发货
<elseif
condition=
"$vo.state eq 3"
/>
已完成
</if>
</div>
</div>
<a
href=
"{:url('get_one',array('id'=>$vo['id']))}"
>
<div
class=
"dingdan_detail_top"
>
<div
class=
"dingdan_detail_hao"
>
订单号:{$vo.order_number}
</div>
</div>
<foreach
name=
"$vo.indent_goods"
item=
"i_g"
>
<div
class=
"dingdan_detail"
>
<div
class=
"log_three_list_center"
style=
"display: flex;justify-content: flex-start;"
>
<div
class=
"log_three_list_center_left"
style=
"width: 1.44rem;height:1.44rem"
>
<img
src=
"{:cmf_get_image_url($i_g.thumbnail)}"
alt=
""
style=
"width: 100%;height: 100%;"
/>
</div>
<!--<div class="log_three_list_center_right" style="margin-left: 0.16rem;width: 5.6rem">-->
<!--<div class="log_three_center_one">-->
<!--{$i_g.book_name}-->
<!--</div>-->
<!--<div class="right_dingdan_money">-->
<!--<div class="log_three_center_three"><span>¥</span>{$i_g.price}</div>-->
<!--<div class="log_three_center_two">×{$i_g.number}</div>-->
<!--</div>-->
<!--</div>-->
<div
class=
"right_dingdan"
>
<div
class=
"right_dingdan_top"
>
<div
class=
"right_dingdan_one"
>
{$i_g.book_name}
</div>
<div
class=
"right_dingdan_two"
>
¥{$i_g.price}
</div>
</div>
<div
class=
"right_dingdan_center"
>
<div
class=
"right_dindan_three right_dingdan_one"
>
x{$i_g.number}
</div>
</div>
<div
class=
"right_dingdan_four right_dingdan_one"
>
{$vo.school} {$vo.grade}
{$vo.class}
</div>
<div
class=
"right_dingdan_four right_dingdan_one"
style=
"margin-top: -0.05rem;"
>
{$vo.name}
{$vo.phone}
</div>
</div>
</div>
</div>
</foreach>
</a>
<!-- 立即发货 -->
<div
class=
"log_three_bottom_btn"
>
<if
condition=
"$vo.state eq 2"
>
<div
class=
"log_three_bottom send"
data-indent-id=
"{$vo.id}"
data-is_courier=
"{$vo.is_courier}"
>
立即发货
</div>
<elseif
condition=
"$vo.state eq 5"
/>
<if
condition=
"$vo.is_courier eq 2"
>
<a
href=
"{:url('logistics/index',array('indent_id'=>$vo['id']))}"
>
<div
class=
"log_three_bottom2"
data-indent-id=
"{$vo.id}"
>
查看物流
</div>
</a>
<div
class=
"log_three_bottom"
data-indent-id=
"{$vo.id}"
>
完成
</div>
</if>
<elseif
condition=
"$vo.state eq 3"
/>
<!--<div class="log_three_bottom" data-indent-id="{$vo.id}">-->
<!--已完成啦-->
<!--</div>-->
</if>
</div>
</div>
</if>
</foreach>
<empty
name=
"$arr1"
>
<div
style=
"text-align: center;width: 100%;height:100%;margin:0 auto;"
>
暂无数据
</div>
</empty>
</div>
<!--已发货-->
<div
class=
"log_three_list_contant"
>
<foreach
name=
"$data"
item=
"vo"
>
<if
condition=
"$vo.state eq 5"
>
<php>
$arr2[] = $vo;
</php>
<div
class=
"log_three_list order_{$vo.id}"
>
<div
class=
"log_three_list_top"
>
<div
class=
"log_three_list_top_left"
>
<if
condition=
"$vo.is_courier eq 1"
>
<div
class=
"log_three_list_top_lo"
>
<img
src=
"__TMPL__/public/assets/images/fangkuang.png"
data-indent-id=
"{$vo['id']}"
alt=
""
/>
</div>
</if>
<div
class=
"log_three_list_top_lt"
>
<div
class=
"log_three_zhongbiao"
>
<img
src=
"__TMPL__/public/assets/images/52.png"
alt=
""
/>
</div>
<div
class=
"log_three_shijian"
>
{$vo['pay_time']}
</div>
</div>
</div>
<div
class=
"log_three_list_top_right"
>
<if
condition=
"$vo.state eq 2"
>
代发货
<elseif
condition=
"$vo.state eq 5"
/>
已发货
<elseif
condition=
"$vo.state eq 3"
/>
已完成
</if>
</div>
</div>
<a
href=
"{:url('get_one',array('id'=>$vo['id']))}"
>
<foreach
name=
"$vo.indent_goods"
item=
"i_g"
>
<div
class=
"log_three_list_center"
style=
"display: flex;justify-content: flex-start;"
>
<div
class=
"log_three_list_center_left"
style=
"width: 1.44rem;height:1.44rem"
>
<img
src=
"{:cmf_get_image_url($i_g.thumbnail)}"
alt=
""
style=
"width: 100%;height: 100%;"
/>
</div>
<div
class=
"log_three_list_center_right"
style=
"margin-left: 0.16rem;"
>
<div
class=
"log_three_center_one"
>
{$i_g.book_name}
</div>
<div
class=
"log_three_center_two"
>
×{$i_g.number}
</div>
<div
class=
"log_three_center_three"
><span>
¥
</span>
{$i_g.price}
</div>
</div>
</div>
</foreach>
</a>
<!-- 立即发货 -->
<div
class=
"log_three_bottom_btn"
>
<if
condition=
"$vo.state eq 2"
>
<div
class=
"log_three_bottom"
data-indent-id=
"{$vo.id}"
data-is_courier=
"{$vo.is_courier}"
>
立即发货
</div>
<elseif
condition=
"$vo.state eq 5"
/>
<if
condition=
"$vo.is_courier eq 2"
>
<a
href=
"{:url('logistics/index',array('indent_id'=>$vo['id']))}"
>
<div
class=
"log_three_bottom"
data-indent-id=
"{$vo.id}"
>
查看物流
</div>
</a>
<else/>
<a
href=
"{:url('logistics/index',array('indent_id'=>$vo['id']))}"
>
<div
class=
"log_three_bottom2"
data-indent-id=
"{$vo.id}"
>
查看物流
</div>
</a>
<div
class=
"take_one"
data-indent-id=
"{$vo.id}"
>
完成
</div>
</if>
<elseif
condition=
"$vo.state eq 3"
/>
<!--<div class="log_three_bottom" data-indent-id="{$vo.id}">-->
<!--已完成啦-->
<!--</div>-->
</if>
</div>
</div>
</if>
</foreach>
<empty
name=
"$arr2"
>
<div
style=
"text-align: center;width: 100%;height:100%;margin:0 auto;"
>
暂无数据
</div>
</empty>
</div>
<!--已完成-->
<div
class=
"log_three_list_contant"
>
<foreach
name=
"$data"
item=
"vo"
>
<if
condition=
"$vo.state eq 3"
>
<php>
$arr3 = $vo;
</php>
<div
class=
"log_three_list order_{$vo.id}"
>
<div
class=
"log_three_list_top"
>
<div
class=
"log_three_list_top_left"
>
<if
condition=
"$vo.is_courier eq 1"
>
<div
class=
"log_three_list_top_lo"
>
<img
src=
"__TMPL__/public/assets/images/fangkuang.png"
data-indent-id=
"{$vo['id']}"
alt=
""
/>
</div>
</if>
<div
class=
"log_three_list_top_lt"
>
<div
class=
"log_three_zhongbiao"
>
<img
src=
"__TMPL__/public/assets/images/52.png"
alt=
""
/>
</div>
<div
class=
"log_three_shijian"
>
{$vo['pay_time']}
</div>
</div>
</div>
<div
class=
"log_three_list_top_right"
>
<if
condition=
"$vo.state eq 2"
>
代发货
<elseif
condition=
"$vo.state eq 5"
/>
已发货
<elseif
condition=
"$vo.state eq 3"
/>
已完成
</if>
</div>
</div>
<a
href=
"{:url('get_one',array('id'=>$vo['id']))}"
>
<foreach
name=
"$vo.indent_goods"
item=
"i_g"
>
<div
class=
"log_three_list_center"
style=
"display: flex;justify-content: flex-start;"
>
<div
class=
"log_three_list_center_left"
style=
"width: 1.44rem;height:1.44rem"
>
<img
src=
"{:cmf_get_image_url($i_g.thumbnail)}"
alt=
""
style=
"width: 100%;height: 100%;"
/>
</div>
<div
class=
"log_three_list_center_right"
style=
"margin-left: 0.16rem;"
>
<div
class=
"log_three_center_one"
>
{$i_g.book_name}
</div>
<div
class=
"log_three_center_two"
>
×{$i_g.number}
</div>
<div
class=
"log_three_center_three"
><span>
¥
</span>
{$i_g.price}
</div>
</div>
</div>
</foreach>
</a>
<!-- 立即发货 -->
<div
class=
"log_three_bottom_btn"
>
<if
condition=
"$vo.state eq 2"
>
<div
class=
"log_three_bottom"
data-indent-id=
"{$vo.id}"
data-is_courier=
"{$vo.is_courier}"
>
立即发货
</div>
<elseif
condition=
"$vo.state eq 5"
/>
<if
condition=
"$vo.is_courier eq 2"
>
<a
href=
"{:url('logistics/index',array('indent_id'=>$vo['id']))}"
>
<div
class=
"log_three_bottom2"
data-indent-id=
"{$vo.id}"
>
查看物流
</div>
</a>
<div
class=
"log_three_bottom"
data-indent-id=
"{$vo.id}"
>
已完成
</div>
</if>
<elseif
condition=
"$vo.state eq 3"
/>
<!--<div class="log_three_bottom" data-indent-id="{$vo.id}">-->
<!--已完成啦-->
<!--</div>-->
</if>
</div>
</div>
</if>
</foreach>
<empty
name=
"$arr3"
>
<div
style=
"text-align: center;width: 100%;height:100%;margin:0 auto;"
>
暂无数据
</div>
</empty>
</div>
</div>
<!-- 底部按钮 -->
<div
style=
"position: fixed;bottom:0;width: 100%;"
>
<div
class=
"log_three_list_fixed"
>
<div
class=
"log_three_fixed_left"
>
<div
class=
"log_three_fixed_left_one"
style=
"cursor: pointer"
>
<img
src=
"__TMPL__/public/assets/images/fangkuang.png"
alt=
""
/>
</div>
<div
class=
"log_three_fixed_left_two"
>
全选
</div>
</div>
<div
class=
"log_three_fixed_right unify_all"
>
统一发货
</div>
</div>
</div>
<script
src=
"__TMPL__/public/assets/js/jquery.js"
></script>
<script
src=
"__TMPL__/public/assets/js/base.js"
></script>
<script
src=
"__TMPL__/public/assets/js/mui.min.js"
></script>
<script
src=
"__TMPL__/public/assets/js/mui.picker.min.js"
></script>
<script
src=
"__TMPL__/public/assets/js/city.data-3.js"
></script>
<script>
var
expresspicker
=
new
mui
.
PopPicker
();
$
(
".clear"
).
click
(
function
()
{
window
.
location
.
reload
();
})
var
schoolpicker
=
new
mui
.
PopPicker
();
var
classpicker
=
new
mui
.
PopPicker
();
var
class_arr
=
''
;
zujian
();
function
zujian
(
data_class_arr
)
{
(
function
(
$
,
doc
)
{
$
.
init
();
school_arr
=
{
$school
};
console
.
log
(
data_class_arr
,
'dfdfds'
);
$
.
ready
(
function
()
{
schoolpicker
.
setData
(
school_arr
);
classpicker
.
setData
(
data_class_arr
);
expresspicker
.
setData
([{
value
:
'2'
,
text
:
'快递配送'
},
{
value
:
'1'
,
text
:
'统一配送'
}]);
});
})(
mui
,
document
);
}
var
express_word
$
(
".log_three_select_tongyi"
).
click
(
function
()
{
expresspicker
.
show
(
function
(
e
)
{
console
.
log
(
e
,
'3333'
)
console
.
log
(
e
[
0
].
value
);
console
.
log
(
e
[
0
].
text
);
express_word
=
e
[
0
].
value
;
console
.
log
(
express_word
,
"experss_word"
)
$
(
".express_word"
).
text
(
e
[
0
].
text
);
$
(
'.express_word'
).
css
(
'color'
,
'#333333'
);
});
})
var
school_name
;
$
(
".log_three_select_school2"
).
click
(
function
()
{
$
(
".log_three_select_class2"
).
text
(
"请选择班级"
).
css
(
"color"
,
"rgba(153, 153, 153, 1)"
);
$
(
"#grade"
).
val
(
""
);
schoolpicker
.
show
(
function
(
e
)
{
school_name
=
e
[
0
].
value
;
school_names
=
e
[
0
].
text
;
$
(
'#school'
).
val
(
school_names
);
$
(
".schools_word"
).
text
(
e
[
0
].
text
);
$
(
'.schools_word'
).
css
(
'color'
,
'#333333'
);
$
.
post
(
"{:url('Personalcenter/get_grade_class')}"
,
{
id
:
school_name
},
function
(
data
)
{
if
(
data
)
{
data
=
JSON
.
parse
(
data
);
zujian
(
data
);
}
});
});
})
$
(
".log_three_select_class2"
).
click
(
function
()
{
if
(
school_name
!=
undefined
)
{
classpicker
.
show
(
function
(
e
)
{
class_name
=
e
[
0
].
text
;
$
(
'#grade'
).
val
(
class_name
);
$
(
".log_three_select_class2"
).
text
(
e
[
0
].
text
);
$
(
'.log_three_select_class2'
).
css
(
'color'
,
'#333333'
);
});
}
else
{
alert
(
"请先选择学校"
)
}
})
var
excompanypicker
=
new
mui
.
PopPicker
();
excompanypicker
.
setData
([{
value
:
'SF'
,
text
:
'顺丰快递'
},
{
value
:
'YTO'
,
text
:
'圆通快递'
},
{
value
:
'ZTO'
,
text
:
'中通快递'
},
{
value
:
'STO'
,
text
:
'申通快递'
},
{
value
:
'YD'
,
text
:
'韵达快递'
},
{
value
:
'HHTT'
,
text
:
'天天快递'
},
{
value
:
'HTKY'
,
text
:
'百世快递'
},
{
value
:
'YZPY'
,
text
:
'邮政快递包裹'
},
{
value
:
'EMS'
,
text
:
'EMS'
},
{
value
:
'DBL'
,
text
:
'德邦快递'
},
{
value
:
'ZJS'
,
text
:
'宅急送'
},
{
value
:
'TNT'
,
text
:
'TNT快递'
}]);
var
excompany_word
$
(
".excompany"
).
click
(
function
()
{
excompanypicker
.
show
(
function
(
e
)
{
console
.
log
(
e
,
'3333'
)
console
.
log
(
e
[
0
].
value
);
console
.
log
(
e
[
0
].
text
);
school_name
=
e
[
0
].
value
$
(
".excompany_word"
).
text
(
e
[
0
].
text
);
$
(
"#logistic_name"
).
val
(
e
[
0
].
value
);
$
(
'.excompany_word'
).
css
(
'color'
,
'#333333'
);
});
})
</script>
<script>
function
zZFun
(
e
)
{
window
.
event
?
(
window
.
event
.
cancelBubble
=
true
)
:
e
.
stopPropagation
();
}
// 选择学校
// $(".three_model_school_left").click(function () {
// var indexs = $(this).index();
// $(".three_model_school_data").eq(indexs).css("display", "block").siblings().css("display", "none");
// });
$
(
".log_three_tab_one"
).
click
(
function
()
{
var
tabIndex
=
$
(
this
).
index
();
$
(
this
).
addClass
(
"log_three_tab_two"
).
addClass
(
"word_color"
).
addClass
(
'aaa'
).
siblings
().
removeClass
(
"log_three_tab_two"
).
removeClass
(
"word_color"
).
removeClass
(
"aaa"
);
$
(
'.log_three_list_contant'
).
eq
(
tabIndex
).
css
(
'display'
,
'block'
).
siblings
().
css
(
'display'
,
'none'
);
search
();
$
(
'.log_three_fixed_left_one img'
).
attr
(
'src'
,
"__TMPL__/public/assets/images/fangkuang.png"
)
});
$
(
".three_model_school_tab>div"
).
click
(
function
()
{
$
(
this
).
addClass
(
"three_model_school_hover"
).
addClass
(
"word_color"
).
addClass
(
'aaa'
).
siblings
().
removeClass
(
"three_model_school_hover"
).
removeClass
(
"word_color"
).
removeClass
(
"aaa"
);
});
$
(
"body"
).
on
(
'click'
,
'.log_three_list_top_lo'
,
function
()
{
if
(
$
(
this
).
find
(
"img"
).
attr
(
"src"
)
==
"__TMPL__/public/assets/images/fangkuang.png"
)
{
$
(
this
).
find
(
"img"
).
attr
(
"src"
,
"__TMPL__/public/assets/images/xuanzhong (1).png"
);
}
else
{
$
(
this
).
find
(
"img"
).
attr
(
"src"
,
"__TMPL__/public/assets/images/fangkuang.png"
);
}
//判断订单是否全选了
check
();
});
function
check
()
{
var
index
=
$
(
".log_three_tab_top .log_three_tab_one"
).
index
(
$
(
'.aaa'
));
var
length
=
$
(
".log_three_list_contant"
).
eq
(
index
).
find
(
'.log_three_list_top_lo img'
).
length
;
var
l
=
0
;
for
(
var
n
=
0
;
n
<
length
;
n
++
)
{
console
.
log
(
$
(
".log_three_list_contant"
).
eq
(
index
).
find
(
'.log_three_list_top_lo img'
).
eq
(
n
).
attr
(
'src'
));
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"
)
{
l
++
}
}
console
.
log
(
'@@@@@'
+
l
+
'@@@@@'
+
length
);
if
(
l
==
length
)
{
$
(
'.log_three_fixed_left_one img'
).
attr
(
'src'
,
"__TMPL__/public/assets/images/xuanzhong (1).png"
)
}
else
{
$
(
'.log_three_fixed_left_one img'
).
attr
(
'src'
,
"__TMPL__/public/assets/images/fangkuang.png"
)
}
}
$
(
".log_three_fixed_left_one"
).
click
(
function
()
{
if
(
$
(
this
)
.
find
(
"img"
)
.
attr
(
"src"
)
==
"__TMPL__/public/assets/images/fangkuang.png"
)
{
$
(
this
)
.
find
(
"img"
)
.
attr
(
"src"
,
"__TMPL__/public/assets/images/xuanzhong (1).png"
);
$
(
".log_three_list_top_lo"
)
.
find
(
"img"
)
.
attr
(
"src"
,
"__TMPL__/public/assets/images/xuanzhong (1).png"
);
}
else
{
$
(
this
)
.
find
(
"img"
)
.
attr
(
"src"
,
"__TMPL__/public/assets/images/fangkuang.png"
);
$
(
".log_three_list_top_lo"
)
.
find
(
"img"
)
.
attr
(
"src"
,
"__TMPL__/public/assets/images/fangkuang.png"
);
}
});
$
(
".log_three_select_peisong"
).
click
(
function
()
{
$
(
".tx_mask"
).
css
({
display
:
"block"
});
});
//统一配送
// $(".log_three_select_tongyi").click(function () {
// $(".tx_mask_tongyi").css({
// display: "block"
// });
// })
// $(".tx_mask_tongyi .three_modal_kuaidi_name").click(function () {
// var index = $(this).index();
// $(this).addClass('there_unActive').siblings().removeClass('there_unActive');
// $('.log_three_select_contant').text($(this).text()).css("color", "#333");
// $(".tx_mask_tongyi").hide();
// $("#is_courier").val($(this).attr('data-id'))
// })
//选择快递方式
$
(
".log_psong_select"
).
click
(
function
()
{
$
(
".tx_mask_kuaidi"
).
css
({
display
:
"block"
});
});
$
(
".tx_mask_kuaidi .get_Go"
).
click
(
function
()
{
var
index
=
$
(
this
).
index
();
console
.
log
(
$
(
this
).
text
());
$
(
this
).
addClass
(
'there_unActive'
).
siblings
().
removeClass
(
'there_unActive'
);
$
(
'.get_Gofo'
).
text
(
$
(
this
).
text
()).
css
(
"color"
,
"#333"
);
$
(
".tx_mask_kuaidi"
).
hide
();
$
(
'#logistic_name'
).
val
(
$
(
this
).
attr
(
'data-name'
))
});
var
index
=
$
(
".log_three_bottom"
).
index
();
$
(
"body"
).
on
(
'click'
,
'.log_three_bottom'
,
function
()
{
$
(
".tx_maskone"
).
css
({
display
:
"block"
});
});
$
(
'body'
).
on
(
'click'
,
".there_class div"
,
function
()
{
var
index2
=
$
(
this
).
index
();
$
(
this
).
addClass
(
"there_unActive"
).
siblings
().
removeClass
(
"there_unActive"
);
if
(
$xuexiao
==
undefined
)
{
alert
(
'请选择学校'
)
}
else
if
(
$
(
this
).
hasClass
(
"there_unActive"
))
{
var
banji
=
$
(
this
).
text
();
$
(
'.log_three_select_school2'
).
text
(
$xuexiao
+
' '
+
"-"
+
' '
+
banji
);
$
(
".log_three_select_school2"
).
css
(
"color"
,
"#333"
)
$
(
".tx_mask_school"
).
hide
();
$
(
'#school'
).
val
(
$xuexiao
);
$
(
'#grade'
).
val
(
banji
);
}
})
// 关闭弹窗
$
(
document
).
mouseup
(
function
(
e
)
{
var
_con
=
$
(
'.tx_maskCon_school'
);
if
(
!
_con
.
is
(
e
.
target
)
&&
_con
.
has
(
e
.
target
).
length
===
0
)
{
$
(
'.tx_mask_school'
).
hide
()
}
});
function
search
()
{
var
school
=
$
(
'#school'
).
val
();
var
grade
=
$
(
'#grade'
).
val
();
var
state
=
$
(
'.log_three_tab_top .aaa'
).
attr
(
'data-state'
);
var
is_courier
=
express_word
$
.
ajax
({
'url'
:
"{:url('order_salesman/getOrderSalesman')}"
,
'type'
:
"GET"
,
'data'
:
{
'school'
:
school
,
'grade'
:
grade
,
'state'
:
state
,
'is_courier'
:
is_courier
},
'success'
:
(
function
(
data
)
{
var
index
=
$
(
'.log_three_tab_top div'
).
index
(
$
(
'.aaa'
));
if
(
data
.
code
==
1
)
{
var
result
=
data
.
data
;
console
.
log
(
"**********"
+
result
.
length
);
if
(
result
.
length
==
0
)
{
var
html
=
"<div style=\"text-align: center;width: 100%;height:100%;margin:0 auto;\">暂无数据</div>"
;
}
else
{
var
html
=
''
;
}
for
(
var
i
=
0
;
i
<
result
.
length
;
i
++
)
{
if
(
result
[
i
][
'state'
]
==
2
)
{
var
state
=
'待发货'
;
if
(
result
[
i
][
'is_courier'
]
==
1
)
{
var
html_bottom
=
"<div class=\"log_three_bottom_btn\"><div class=\"log_three_bottom send\" data-indent-id=\""
+
result
[
i
].
id
+
"\" data-is_courier=\""
+
result
[
i
].
is_courier
+
"\">\n"
+
"\t\t\t\t\t\t\t\t\t\t立即发货\n"
+
"\t\t\t\t\t\t\t\t\t</div></div>"
;
}
else
{
var
html_bottom
=
"<div class=\"log_three_bottom_btn\"><div class=\"log_three_bottom send\" data-indent-id=\""
+
result
[
i
].
id
+
"\" data-is_courier=\""
+
result
[
i
].
is_courier
+
"\">\n"
+
"\t\t\t\t\t\t\t\t\t\t立即发货\n"
+
"\t\t\t\t\t\t\t\t\t</div></div>"
;
}
}
else
if
(
result
[
i
][
'state'
]
==
5
)
{
var
state
=
'已发货'
;
if
(
result
[
i
][
'is_courier'
]
==
2
)
{
var
html_bottom
=
"<a href=\"{:url('logistics/index','',false,true)}/indent_id/"
+
result
[
i
].
id
+
"\">\n"
+
"\t\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_bottom_btn\"><div class=\"log_three_bottom2\" data-indent-id=\""
+
result
[
i
].
id
+
"\">\n"
+
"\t\t\t\t\t\t\t\t\t\t\t\t查看物流\n"
+
"\t\t\t\t\t\t\t\t\t\t\t</div></div>\n"
+
"\t\t\t\t\t\t\t\t\t\t</a>"
;
}
else
{
var
html_bottom
=
"<a href=\"{:url('logistics/index','',false,true)}/indent_id/"
+
result
[
i
].
id
+
"\">\n"
+
" <div class=\"log_three_bottom2\" data-indent-id=\""
+
result
[
i
].
id
+
"\" style='margin-right: 15px;'>\n"
+
" 查看物流\n"
+
" </div>\n"
+
" </a><div class=\"take_one\" data-indent-id=\""
+
result
[
i
].
id
+
"\">\n"
+
" 完成\n"
+
" </div>"
;
}
}
else
{
var
state
=
'已完成'
;
var
html_bottom
=
""
;
}
var
indent_goods_data
=
result
[
i
].
indent_goods
;
var
indent_goods_html
=
''
;
for
(
var
i3
=
0
;
i3
<
indent_goods_data
.
length
;
i3
++
)
{
// indent_goods_html += "<div class=\"log_three_list_center\" style=\"display: flex;justify-content: flex-start;\">\n" +
// " <div class=\"log_three_list_center_left\" style=\"width: 1.44rem;height:1.44rem\">\n" +
// " <img src=\"" + indent_goods_data[i3].thumbnail + "\" alt=\"\" style=\"width: 100%;height: 100%;\"/>\n" +
// " </div>\n" +
// " <div class=\"log_three_list_center_right\" style=\"margin-left: 0.16rem;\">\n" +
// " <div class=\"log_three_center_one\">\n" +
// " " + indent_goods_data[i3].book_name + "\n" +
// " </div>\n" +
// " <div class=\"log_three_center_two\">×" + indent_goods_data[i3].number + "</div>\n" +
// " <div class=\"log_three_center_three\"><span>¥</span>" + indent_goods_data[i3].price + "</div>\n" +
// " </div>\n" +
// " </div>";
if
(
result
[
i
].
is_courier
==
2
)
{
indent_goods_html
+=
"<div class=\"dingdan_detail\">\n"
+
" <div class=\"log_three_list_center\" style=\"display: flex;justify-content: flex-start;\">\n"
+
" <div class=\"log_three_list_center_left\" style=\"width: 1.44rem;height:1.44rem\">\n"
+
" <img src=\""
+
indent_goods_data
[
i3
].
thumbnail
+
"\" alt=\"\"\n"
+
" style=\"width: 100%;height: 100%;\"/>\n"
+
" </div>\n"
+
" <div class=\"right_dingdan\">\n"
+
" <div class=\"right_dingdan_top\">\n"
+
" <div class=\"right_dingdan_one\">"
+
indent_goods_data
[
i3
].
book_name
+
"</div>\n"
+
" <div class=\"right_dingdan_two\">¥"
+
indent_goods_data
[
i3
].
price
+
"</div>\n"
+
" </div>\n"
+
" <div class=\"right_dingdan_center\">\n"
+
" <div class=\"right_dindan_three right_dingdan_one\">x"
+
indent_goods_data
[
i3
].
number
+
"</div>\n"
+
" </div>\n"
+
"\n"
+
" <div class=\"right_dingdan_four right_dingdan_one\">"
+
result
[
i
].
region
+
" "
+
result
[
i
].
detailed
+
"\n"
+
" </div>\n"
+
" <div class=\"right_dingdan_four right_dingdan_one\" style=\"margin-top: -0.05rem;\">\n"
+
" "
+
result
[
i
].
name
+
" "
+
result
[
i
].
phone
+
"\n"
+
" </div>\n"
+
" </div>\n"
+
" </div>\n"
+
" </div>"
;
}
else
{
indent_goods_html
+=
"<div class=\"dingdan_detail\">\n"
+
" <div class=\"log_three_list_center\" style=\"display: flex;justify-content: flex-start;\">\n"
+
" <div class=\"log_three_list_center_left\" style=\"width: 1.44rem;height:1.44rem\">\n"
+
" <img src=\""
+
indent_goods_data
[
i3
].
thumbnail
+
"\" alt=\"\"\n"
+
" style=\"width: 100%;height: 100%;\"/>\n"
+
" </div>\n"
+
" <div class=\"right_dingdan\">\n"
+
" <div class=\"right_dingdan_top\">\n"
+
" <div class=\"right_dingdan_one\">"
+
indent_goods_data
[
i3
].
book_name
+
"</div>\n"
+
" <div class=\"right_dingdan_two\">¥"
+
indent_goods_data
[
i3
].
price
+
"</div>\n"
+
" </div>\n"
+
" <div class=\"right_dingdan_center\">\n"
+
" <div class=\"right_dindan_three right_dingdan_one\">x"
+
indent_goods_data
[
i3
].
number
+
"</div>\n"
+
" </div>\n"
+
"\n"
+
" <div class=\"right_dingdan_four right_dingdan_one\">"
+
result
[
i
].
school
+
" "
+
result
[
i
].
grade
+
"\n"
+
" "
+
result
[
i
].
class
+
"\n"
+
" </div>\n"
+
" <div class=\"right_dingdan_four right_dingdan_one\" style=\"margin-top: -0.05rem;\">\n"
+
" "
+
result
[
i
].
name
+
" "
+
result
[
i
].
phone
+
"\n"
+
" </div>\n"
+
" </div>\n"
+
" </div>\n"
+
" </div>"
;
}
}
if
(
result
[
i
].
is_courier
==
1
)
{
html
+=
"<div class=\"log_three_list order_"
+
result
[
i
].
id
+
"\">\n"
+
"\t\t\t\t\t\t\t<div class=\"log_three_list_top\">\n"
+
"\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_left\">\n"
+
"\t\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_lo\">\n"
+
"\t\t\t\t\t\t\t\t\t\t<img src=\"__TMPL__/public/assets/images/fangkuang.png\" data-indent-id=\""
+
result
[
i
].
id
+
"\" alt=\"\" />\n"
+
"\t\t\t\t\t\t\t\t\t</div>\n"
+
"\t\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_lt\">\n"
+
"\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_zhongbiao\">\n"
+
"\t\t\t\t\t\t\t\t\t\t\t<img src=\"__TMPL__/public/assets/images/52.png\" alt=\"\" />\n"
+
"\t\t\t\t\t\t\t\t\t\t</div>\n"
+
"\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_shijian\">\n"
+
"\t\t\t\t\t\t\t\t\t\t\t"
+
result
[
i
].
pay_time
+
"\n"
+
"\t\t\t\t\t\t\t\t\t\t</div>\n"
+
"\t\t\t\t\t\t\t\t\t</div>\n"
+
"\t\t\t\t\t\t\t\t</div>\n"
+
"\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_right\">\n"
+
"\t\t\t\t\t\t\t\t\t\t"
+
state
+
"\n"
+
"\t\t\t\t\t\t\t\t</div>\n"
+
"\t\t\t\t\t\t\t</div><a href=\"{:url('get_one','',false,true)}/id/"
+
result
[
i
].
id
+
"\"><div class=\"dingdan_detail_top\">\n"
+
" <div class=\"dingdan_detail_hao\">订单号:"
+
result
[
i
].
order_number
+
"</div>\n"
+
" </div>\n"
+
indent_goods_html
+
"</a>"
+
"\t\t\t\t\t\t<div class=\"log_three_bottom_btn\">"
+
html_bottom
+
"</div></div>"
;
}
else
if
(
result
[
i
].
is_courier
==
2
)
{
console
.
log
(
"++"
+
html
);
html
+=
"<div class=\"log_three_list order_"
+
result
[
i
].
id
+
"\">\n"
+
"\t\t\t\t\t\t\t<div class=\"log_three_list_top\">\n"
+
"\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_left\">\n"
+
// "\t\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_lo\">\n" +
// "\t\t\t\t\t\t\t\t\t\t<img src=\"__TMPL__/public/assets/images/fangkuang.png\" alt=\"\" />\n" +
// "\t\t\t\t\t\t\t\t\t</div>\n" +
"\t\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_lt\">\n"
+
"\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_zhongbiao\">\n"
+
"\t\t\t\t\t\t\t\t\t\t\t<img src=\"__TMPL__/public/assets/images/52.png\" alt=\"\" />\n"
+
"\t\t\t\t\t\t\t\t\t\t</div>\n"
+
"\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_shijian\">\n"
+
"\t\t\t\t\t\t\t\t\t\t\t"
+
result
[
i
].
pay_time
+
"\n"
+
"\t\t\t\t\t\t\t\t\t\t</div>\n"
+
"\t\t\t\t\t\t\t\t\t</div>\n"
+
"\t\t\t\t\t\t\t\t</div>\n"
+
"\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_right\">\n"
+
"\t\t\t\t\t\t\t\t\t\t"
+
state
+
"\n"
+
"\t\t\t\t\t\t\t\t</div>\n"
+
"\t\t\t\t\t\t\t</div><a href=\"{:url('get_one','',false,true)}/id/"
+
result
[
i
].
id
+
"\"><div class=\"dingdan_detail_top\">\n"
+
" <div class=\"dingdan_detail_hao\">订单号:"
+
result
[
i
].
order_number
+
"</div>\n"
+
" </div>\n"
+
indent_goods_html
+
"</a>"
+
"\t\t\t\t\t\t<div class=\"log_three_bottom_btn\">"
+
html_bottom
+
"</div></div>"
;
}
}
console
.
log
(
html
);
$
(
'.count'
).
html
(
i
);
console
.
log
(
'@@@@@@@@@@'
+
index
);
$
(
'.log_three_list_contant'
).
eq
(
index
).
html
(
html
);
update
();
}
else
{
alert
(
'未知错误'
);
}
}),
'error'
:
(
function
()
{
alert
(
'与服务器断开连接'
);
})
})
// }
}
$
(
function
()
{
$
(
'.school'
).
click
(
function
()
{
var
school_id
=
$
(
this
).
attr
(
'data-id'
);
$
.
ajax
({
url
:
"{:url('order_salesman/getGradeClass')}"
,
type
:
'GET'
,
data
:
{
'school_id'
:
school_id
},
success
:
(
function
(
data
)
{
if
(
data
.
code
==
1
)
{
var
result
=
data
.
data
;
var
html
=
''
;
for
(
var
i
=
0
;
i
<
result
.
length
;
i
++
)
{
var
i2
=
Number
(
result
[
i
].
start
);
var
j
=
Number
(
result
[
i
].
end
);
for
(
i2
;
i2
<=
j
;
i2
++
)
{
// if(i == 0){
// html += "<div class=\"three_model_school_name there_unActive\" data-id=\""+result[i].id+"\">"+result[i].grade+"—"+i2+"</div>";
// }
html
+=
"<div class=\"three_model_class_name\" data-id=\""
+
result
[
i
].
id
+
"\">"
+
result
[
i
].
grade
+
"-"
+
i2
+
"班</div>"
;
}
}
$
(
'.grade'
).
html
(
html
);
}
else
{
alert
(
data
.
msg
);
}
})
})
})
$
(
'.search'
).
click
(
function
()
{
search
();
});
//发货
$
(
"body"
).
on
(
'click'
,
'.send'
,
function
()
{
var
indent_id
=
$
(
this
).
attr
(
'data-indent-id'
);
var
is_courier
=
$
(
this
).
attr
(
'data-is_courier'
);
if
(
is_courier
==
1
)
{
//统一配送
$
(
'.time'
).
show
();
$
(
'.logistic'
).
hide
();
}
else
if
(
is_courier
==
2
)
{
//快递
$
(
'.time'
).
hide
();
$
(
'.logistic'
).
show
();
}
$
(
'.confirm'
).
attr
(
'data-is_courier'
,
is_courier
);
$
(
'.confirm'
).
attr
(
'data-indent-id'
,
indent_id
);
$
(
'.confirm'
).
attr
(
'data-is_courier'
,
is_courier
);
});
//点击确认
$
(
'.confirm'
).
click
(
function
()
{
var
is_courier
=
$
(
this
).
attr
(
'data-is_courier'
);
var
start_time
=
$
(
'#start_time'
).
val
();
// var end_time = $('#end_time').val();
var
logistic_name
=
$
(
'#logistic_name'
).
val
();
console
.
log
(
logistic_name
);
var
logistic_code
=
$
(
'#logistic_code'
).
val
();
var
indent_id
=
$
(
this
).
attr
(
'data-indent-id'
);
if
(
is_courier
==
1
)
{
if
(
start_time
==
''
)
{
alert
(
'请填写配送时间'
);
return
false
;
}
// else if (end_time == '') {
// alert('请填写配送时间');
// return false;
// }
}
else
if
(
is_courier
==
2
)
{
if
(
logistic_name
==
''
)
{
alert
(
'请填写快递公司'
);
return
false
;
}
else
if
(
logistic_code
==
''
)
{
alert
(
'请填写快递单号'
);
return
false
;
}
}
else
if
(
is_courier
==
''
)
{
alert
(
'未知错误'
);
return
false
;
}
$
.
ajax
({
url
:
"{:url('order_salesman/send')}"
,
type
:
"GET"
,
data
:
{
'start_time'
:
start_time
,
// 'end_time': end_time,
'logistic_name'
:
logistic_name
,
'logistic_code'
:
logistic_code
,
'is_courier'
:
is_courier
,
'indent_id'
:
indent_id
},
success
:
function
(
res
)
{
if
(
res
.
code
==
1
)
{
$
(
'.order_'
+
indent_id
).
remove
();
$
(
".tx_maskone"
).
css
({
display
:
"none"
});
$
(
".tx_mask"
).
css
({
display
:
"none"
});
}
var
count
=
Number
(
$
(
'.count'
).
text
());
if
(
count
>
0
)
{
count
--
;
}
$
(
".count"
).
text
(
count
);
alert
(
res
.
msg
)
},
error
:
function
(
res
)
{
alert
(
'与服务器断开连接'
)
}
})
});
$
(
'body'
).
on
(
'click'
,
'.unify_all'
,
function
()
{
var
index
=
$
(
".log_three_tab_top .log_three_tab_one"
).
index
(
$
(
'.aaa'
));
var
length
=
$
(
".log_three_list_contant"
).
eq
(
index
).
find
(
'.log_three_list_top_lo img'
).
length
-
1
;
var
arr
=
[];
for
(
var
i
=
0
;
i
<=
length
;
i
++
)
{
if
(
$
(
'.log_three_list_top_lo img'
).
eq
(
i
).
attr
(
'src'
)
==
"__TMPL__/public/assets/images/xuanzhong (1).png"
)
{
arr
.
push
(
$
(
'.log_three_list_top_lo img'
).
eq
(
i
).
attr
(
'data-indent-id'
));
}
}
$
(
'.confirm2'
).
attr
(
'data-indent-id'
,
arr
.
join
(
","
));
var
type
=
$
(
'.unify_all'
).
attr
(
'data-type'
);
if
(
arr
.
length
!=
0
)
{
if
(
type
==
1
)
{
$
.
ajax
({
url
:
"{:url('take_all')}"
,
type
:
"GET"
,
data
:
{
'indent_ids'
:
arr
.
join
(
","
)},
success
:
function
(
res
)
{
if
(
res
.
code
==
1
)
{
var
count
=
Number
(
$
(
'.count'
).
text
());
$
(
arr
).
each
(
function
(
i
,
vo
)
{
if
(
count
>
0
)
{
count
--
;
}
$
(
'.order_'
+
vo
).
remove
();
});
$
(
".count"
).
text
(
count
);
alert
(
'操作成功'
)
}
else
{
alert
(
res
.
msg
);
}
}
})
}
else
{
$
(
'.tx_masktwo'
).
show
();
}
}
else
{
alert
(
'请至少选择一个订单'
);
}
});
$
(
'.confirm2'
).
click
(
function
()
{
var
start_time2
=
$
(
'#start_time2'
).
val
();
// var end_time2 = $('#end_time2').val();
var
indent_ids
=
$
(
this
).
attr
(
'data-indent-id'
);
if
(
indent_ids
==
''
)
{
alert
(
'请至少选择一个订单'
);
}
else
if
(
start_time2
==
''
)
{
alert
(
'请选择配送时间'
)
}
// else if (end_time2 == '') {
// alert('请选择配送时间')
// }
else
{
$
.
ajax
({
url
:
"{:url('order_salesman/send_all')}"
,
type
:
"GET"
,
data
:
{
'start_time2'
:
start_time2
,
// 'end_time2': end_time2,
'indent_ids'
:
indent_ids
},
success
:
function
(
res
)
{
console
.
log
(
indent_ids
);
indent_ids
=
indent_ids
.
split
(
","
);
console
.
log
(
indent_ids
)
if
(
res
.
code
==
1
)
{
$
.
each
(
indent_ids
,
function
(
key
,
indent_id
)
{
$
(
'.order_'
+
indent_id
).
remove
();
});
$
(
".tx_masktwo"
).
css
({
display
:
"none"
});
alert
(
res
.
msg
)
}
else
{
alert
(
res
.
msg
);
}
}
})
}
});
update
();
$
(
'body'
).
on
(
'click'
,
'.take_one'
,
function
()
{
var
indent_id
=
$
(
this
).
attr
(
'data-indent-id'
);
$
.
ajax
({
url
:
"{:url('take_one')}"
,
type
:
"GET"
,
data
:
{
'indent_id'
:
indent_id
},
success
:
function
(
res
)
{
if
(
res
.
code
==
1
)
{
$
(
'.order_'
+
indent_id
).
remove
();
alert
(
'操作成功'
)
}
else
{
alert
(
res
.
msg
)
}
}
})
})
})
function
update
()
{
var
is_courier
=
$
(
'#is_courier'
).
val
();
var
index
=
$
(
'.log_three_tab_top'
).
children
(
'.aaa'
).
index
();
if
(
is_courier
==
1
&&
index
==
0
)
{
$
(
'.log_three_list_fixed'
).
show
();
$
(
'.unify_all'
).
text
(
'统一发货'
);
$
(
'.unify_all'
).
attr
(
'data-type'
,
''
)
}
else
if
(
is_courier
==
2
||
(
index
!=
0
&&
index
!=
1
))
{
$
(
'.log_three_list_fixed'
).
hide
();
}
else
if
(
index
==
1
)
{
$
(
'.unify_all'
).
text
(
'统一完成'
);
$
(
'.unify_all'
).
attr
(
'data-type'
,
1
)
}
}
</script>
<script
type=
"text/javascript"
>
var
dtpicker
=
new
mui
.
DtPicker
({
type
:
"date"
,
//设置日历初始视图模式
beginDate
:
new
Date
(
2015
,
04
,
25
),
//设置开始日期
labels
:
[
'年'
,
'月'
,
'日'
],
//设置默认标签区域提示语
})
//统一配送选择时间
$
(
".tongyi_start_time"
).
click
(
function
()
{
dtpicker
.
show
(
function
(
e
)
{
console
.
log
(
e
);
$
(
'.tongyi_start_time'
).
text
(
e
.
text
);
$
(
'#start_time'
).
val
(
e
.
text
);
$
(
'.tongyi_start_time'
).
css
(
'color'
,
'#333333'
);
});
});
$
(
".tongyi_start_time2"
).
click
(
function
()
{
dtpicker
.
show
(
function
(
e
)
{
console
.
log
(
e
);
$
(
'.tongyi_start_time2'
).
text
(
e
.
text
);
$
(
'#start_time2'
).
val
(
e
.
text
);
$
(
'.tongyi_start_time2'
).
css
(
'color'
,
'#333333'
);
});
});
function
zZFun
(
e
)
{
window
.
event
?
(
window
.
event
.
cancelBubble
=
true
)
:
e
.
stopPropagation
();
}
</script>
<script
src=
"https://cdn.bootcss.com/html2canvas/0.5.0-beta4/html2canvas.js"
></script>
<script>
$
(
".html2canvas"
).
click
(
function
()
{
// html2canvas($(".log_three_list_contant")).then(function (canvas) {
// var imgUri = canvas.toDataURL("image/png").replace("image/png", "image/octet-stream"); // 获取生成的图片的url
// window.location.href = imgUri; // 下载图片
// });
alert
(
132
);
html2canvas
(
$
(
'.log_three_list_contant'
),
{
onrendered
:
function
(
canvas
)
{
var
data
=
canvas
.
toDataURL
(
"image/jpg"
,
"image/octet-stream"
);
//生成的格式
//data就是生成的base64码啦
console
.
log
(
data
);
downloadFile
(
'ceshi.png'
,
data
);
}
});
});
function
downloadFile
(
fileName
,
content
)
{
let
aLink
=
document
.
createElement
(
'a'
);
let
blob
=
this
.
base64ToBlob
(
content
);
//new Blob([content]);
let
evt
=
document
.
createEvent
(
"HTMLEvents"
);
evt
.
initEvent
(
"click"
,
true
,
true
);
//initEvent 不加后两个参数在FF下会报错 事件类型,是否冒泡,是否阻止浏览器的默认行为
aLink
.
download
=
fileName
;
aLink
.
href
=
URL
.
createObjectURL
(
blob
);
// aLink.dispatchEvent(evt);
aLink
.
click
()
}
//base64转blob
function
base64ToBlob
(
code
)
{
let
parts
=
code
.
split
(
';base64,'
);
let
contentType
=
parts
[
0
].
split
(
':'
)[
1
];
let
raw
=
window
.
atob
(
parts
[
1
]);
let
rawLength
=
raw
.
length
;
let
uInt8Array
=
new
Uint8Array
(
rawLength
);
for
(
let
i
=
0
;
i
<
rawLength
;
++
i
)
{
uInt8Array
[
i
]
=
raw
.
charCodeAt
(
i
);
}
return
new
Blob
([
uInt8Array
],
{
type
:
contentType
});
}
</script>
</body>
</html>
\ No newline at end of file
...
...
请
注册
或
登录
后发表评论