Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
朱继来
/
后台订单管理
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
05b2beab
authored
Jun 23, 2020
by
孙龙
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://119.23.72.7/zhujilai/Order
parents
4454e9ae
ba6a0201
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
298 additions
and
154 deletions
app/Http/Controllers/OrderController.php
app/Http/Controllers/PermController.php
app/Http/Controllers/ReturnController.php
app/Http/routes.php
app/Model/OrderModel.php
config/config.php
public/js/order_audit.js
public/js/order_send_email.js
public/js/refund.js
resources/views/changeOrder/content.blade.php
resources/views/detail/content.blade.php
resources/views/detail/detail_action_log.php
resources/views/detail/detail_base_info.blade.php
resources/views/detail/detail_items_info.php
resources/views/detail/detail_multi_info.php
resources/views/detail/js.blade.php
resources/views/orderlist/content.blade.php
resources/views/orderlist/js.blade.php
resources/views/returnDetails/content.blade.php
resources/views/selfOrder/content.blade.php
app/Http/Controllers/OrderController.php
View file @
05b2beab
...
@@ -699,7 +699,7 @@ Class OrderController extends Controller
...
@@ -699,7 +699,7 @@ Class OrderController extends Controller
}
}
}
else
{
}
else
{
$perm
=
new
PermController
;
$perm
=
new
PermController
;
$info
[
'buyers'
]
=
$perm
->
getUserBy
Condition
(
''
,
39
);
// 获取采购员, ID - 39
$info
[
'buyers'
]
=
$perm
->
getUserBy
DepartmentId
(
8
,
0
);
// 获取采购部人员
$perm
=
new
PermController
;
$perm
=
new
PermController
;
$sale_list
=
$perm
->
getUserByDepartmentId
(
Config
(
'perm_args.sales_department_id'
),
0
);
// 获取所有的销售
$sale_list
=
$perm
->
getUserByDepartmentId
(
Config
(
'perm_args.sales_department_id'
),
0
);
// 获取所有的销售
...
@@ -894,9 +894,13 @@ Class OrderController extends Controller
...
@@ -894,9 +894,13 @@ Class OrderController extends Controller
$url
=
Config
(
'website.api_domain'
)
.
'order/tempSaveOrder'
;
$url
=
Config
(
'website.api_domain'
)
.
'order/tempSaveOrder'
;
}
else
{
}
else
{
$auditor_role
=
$request
->
input
(
'auditor_role'
,
1
);
// 当前操作人角色
$auditor_role
=
$request
->
input
(
'auditor_role'
,
1
);
// 当前操作人角色
$order_goods_type
=
$request
->
input
(
'order_goods_type'
,
1
);
$resData
[
'status'
]
=
$auditor_role
==
3
?
1
:
2
;
// 角色为‘查看自己’时,状态为待审核,否则为待付款
if
(
$order_goods_type
==
1
)
{
// $resData['status'] = $auditor_role == 3 ? 1 : 2; // 角色为‘查看自己’时,状态为待审核,否则为待付款
$resData
[
'is_manager'
]
=
$auditor_role
==
3
?
0
:
1
;
// 角色为‘查看自己’时,is_manager = 0
}
$url
=
Config
(
'website.api_domain'
)
.
'order/changeOrder'
;
$url
=
Config
(
'website.api_domain'
)
.
'order/changeOrder'
;
}
}
...
@@ -907,6 +911,23 @@ Class OrderController extends Controller
...
@@ -907,6 +911,23 @@ Class OrderController extends Controller
}
}
}
}
// 申请主管审核
public
function
ajaxApplyManagerAudit
(
Request
$request
)
{
if
(
$request
->
isMethod
(
'post'
))
{
$data
[
'order_id'
]
=
$request
->
input
(
'order_id'
,
''
);
$data
[
'operator_id'
]
=
$request
->
user
->
userId
;
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$url
=
Config
(
'website.api_domain'
)
.
'order/applyManagerAudit'
;
$temp
=
json_decode
(
curlApi
(
$url
,
$data
,
"POST"
),
true
);
return
array
(
'errcode'
=>
$temp
[
'err_code'
],
'errmsg'
=>
$temp
[
'err_msg'
]);
}
}
// 主管审核
// 主管审核
public
function
ajaxAuditPass
(
Request
$request
)
public
function
ajaxAuditPass
(
Request
$request
)
{
{
...
@@ -1014,10 +1035,10 @@ Class OrderController extends Controller
...
@@ -1014,10 +1035,10 @@ Class OrderController extends Controller
$info
[
'online_sales_chief'
]
=
$perm
->
getUserByCondition
(
33
,
66
,
0
);
// 线上销售-33 线上销售总监-66
$info
[
'online_sales_chief'
]
=
$perm
->
getUserByCondition
(
33
,
66
,
0
);
// 线上销售-33 线上销售总监-66
$info
[
'online_sales_mgr'
]
=
$perm
->
getDepartmentUser
(
33
,
63
);
// 线上销售-33 销售经理-63
$info
[
'online_sales_mgr'
]
=
$perm
->
getDepartmentUser
(
33
,
63
);
// 线上销售-33 销售经理-63
$info
[
'online_sales_kefu_1'
]
=
$perm
->
getUserByCondition
(
34
,
''
,
0
);
// 线上一组
$info
[
'online_sales_kefu_1'
]
=
$perm
->
getUserByCondition
(
34
,
62
,
0
);
// 线上一组销售
$info
[
'online_sales_kefu_2'
]
=
$perm
->
getUserByCondition
(
35
,
''
,
0
);
// 线上二组
$info
[
'online_sales_kefu_2'
]
=
$perm
->
getUserByCondition
(
35
,
62
,
0
);
// 线上二组销售
$info
[
'online_sales_kefu_3'
]
=
$perm
->
getUserByCondition
(
36
,
''
,
0
);
// 线上三组
$info
[
'online_sales_kefu_3'
]
=
$perm
->
getUserByCondition
(
36
,
62
,
0
);
// 线上三组销售
$info
[
'online_sales_kefu_4'
]
=
$perm
->
getUserByCondition
(
37
,
''
,
0
);
// 线上四组
$info
[
'online_sales_kefu_4'
]
=
$perm
->
getUserByCondition
(
37
,
62
,
0
);
// 线上四组销售
$info
[
'offline_sales_chief'
]
=
$perm
->
getUserByCondition
(
40
,
90
,
0
);
// 线下销售-39 线下销售总监-90
$info
[
'offline_sales_chief'
]
=
$perm
->
getUserByCondition
(
40
,
90
,
0
);
// 线下销售-39 线下销售总监-90
$info
[
'offline_sales_all'
]
=
$perm
->
getDepartmentUser
(
40
,
62
);
// 线下销售各组人员
$info
[
'offline_sales_all'
]
=
$perm
->
getDepartmentUser
(
40
,
62
);
// 线下销售各组人员
...
@@ -2066,68 +2087,53 @@ Class OrderController extends Controller
...
@@ -2066,68 +2087,53 @@ Class OrderController extends Controller
{
{
$id
=
$request
->
input
(
'id'
);
$id
=
$request
->
input
(
'id'
);
$cc_email
=
$request
->
input
(
'cc_email'
,
''
);
// 额外抄送人
$cc_email
=
$request
->
input
(
'cc_email'
,
''
);
// 额外抄送人
$info
=
$this
->
orderDetail
(
$request
,
$id
);
$info
=
$this
->
orderDetail
(
$request
,
$id
);
$send_buyers
=
[];
// 发送采购邮件数据
$CmsModel
=
new
CmsModel
();
$sale_name
=
$CmsModel
->
getUserName
(
$info
[
'order_info'
][
'sale_id'
]);
//获取业务员
$to_user_array
=
[];
//循环订单详情
//循环订单详情
foreach
(
$info
[
'order_items_info'
]
as
$key
=>
$value
)
{
foreach
(
$info
[
'order_items_info'
]
as
$key
=>
$value
)
{
if
(
$value
[
'status'
]
==
-
1
)
continue
;
if
(
empty
(
$value
[
'batch'
]))
return
[
'errcode'
=>-
1
,
'errmsg'
=>
'商品:'
.
$value
[
'goods_name'
]
.
'缺少批次<br/>'
.
'请填写批次后再发送'
];
if
(
empty
(
$value
[
'buyerName'
]))
return
[
'errcode'
=>-
1
,
'errmsg'
=>
'商品:'
.
$value
[
'goods_name'
]
.
'缺少采购人员<br/>'
.
'请填写采购后再发送'
];
$tmp
=
[];
$tmp
[
'orderNum'
]
=
$info
[
'order_temp_info'
][
'erp_sn'
];
$tmp
[
'orderNum'
]
=
$info
[
'order_temp_info'
][
'erp_sn'
];
$tmp
[
'goods'
]
=
$value
[
'goods_name'
];
$tmp
[
'goods'
]
=
$value
[
'goods_name'
];
$tmp
[
'purchasingPrice'
]
=
$value
[
'goods_price'
];
//采购价
$tmp
[
'purchasingPrice'
]
=
$value
[
'goods_price'
];
//采购价
$tmp
[
'unitPrice'
]
=
$value
[
'
goods_price'
];
//
单价
$tmp
[
'unitPrice'
]
=
$value
[
'
single_pre_price'
];
//均摊
单价
$tmp
[
'brand'
]
=
$value
[
'brand_name'
];
$tmp
[
'brand'
]
=
$value
[
'brand_name'
];
$tmp
[
'nums'
]
=
$value
[
'goods_number'
];
$tmp
[
'nums'
]
=
$value
[
'goods_number'
];
$tmp
[
'currency'
]
=
$info
[
'order_info'
][
'currency'
]
==
1
?
'人民币'
:
'美元'
;
$tmp
[
'currency'
]
=
$info
[
'order_info'
][
'currency'
]
==
1
?
'人民币'
:
'美元'
;
$tmp
[
'totalPrice'
]
=
$value
[
'goods_amount'
]
;
$tmp
[
'totalPrice'
]
=
number_format
(
$value
[
'goods_number'
]
*
$value
[
'single_pre_price'
],
2
,
'.'
,
''
)
;
$tmp
[
'remarks'
]
=
$value
[
'remarks'
];
$tmp
[
'remarks'
]
=
$value
[
'remarks'
];
$tmp
[
'material'
]
=
$value
[
'erp_rec_id'
];
$tmp
[
'material'
]
=
$value
[
'material_number'
];
$tmp
[
'purchasing'
]
=
!
empty
(
$value
[
'buyerName'
])
?
$value
[
'buyerName'
]
:
''
;
$tmp
[
'purchasing'
]
=
!
empty
(
$value
[
'buyerName'
])
?
$value
[
'buyerName'
]
:
''
;
$tmp
[
'projectId'
]
=
$key
+
1
;
$tmp
[
'deliveryTime'
]
=
$value
[
'batch'
];
//批次
$tmp
[
'send_email'
]
=
!
empty
(
$value
[
'send_email'
])
?
$value
[
'send_email'
]
:
''
;
if
(
empty
(
$value
[
'batch'
])){
$msg
=
'商品:'
.
$tmp
[
'goods'
]
.
'缺少批次<br/>'
.
'请填写批次后再发送'
;
echo
json_encode
([
'errcode'
=>-
1
,
'errmsg'
=>
$msg
]);
exit
;
}
if
(
empty
(
$value
[
'buyerName'
])){
$send_buyers
[
$value
[
'buyer_id'
]][
'data'
][]
=
$tmp
;
$msg
=
'商品:'
.
$tmp
[
'goods'
]
.
'缺少采购人员<br/>'
.
'请填写采购后再发送'
;
$send_buyers
[
$value
[
'buyer_id'
]][
'toUser'
]
=
$value
[
'send_email'
];
echo
json_encode
([
'errcode'
=>-
1
,
'errmsg'
=>
$msg
]);
$send_buyers
[
$value
[
'buyer_id'
]][
'date'
]
=
date
(
'Y-m-d'
,
time
());
exit
;
$send_buyers
[
$value
[
'buyer_id'
]][
'date'
]
=
intval
(
$id
);
}
$send_buyers
[
$value
[
'buyer_id'
]][
'id'
]
=
$sale_name
;
//批次
$tmp
[
'deliveryTime'
]
=
$value
[
'batch'
];
$tmp
[
'send_email'
]
=
!
empty
(
$value
[
'send_email'
])
?
$value
[
'send_email'
]
:
''
;
$data
[
'data'
][]
=
$tmp
;
}
//循环出邮件接收人
foreach
(
$data
[
'data'
]
as
$key
=>
$value
)
{
$send_mail_array
[]
=
$value
[
'send_email'
];
}
$send_mail_array
=
array_unique
(
$send_mail_array
)
;
$to_user_array
[]
=
$value
[
'send_email'
]
;
if
(
empty
(
$send_mail_array
[
0
])){
// $tmp['projectId'] = $key+1;
echo
json_encode
([
'errcode'
=>-
1
,
'errmsg'
=>
'没有填写采购人员,请至少填写一个采购人员'
]);
// $data['data'][] = $tmp;
exit
;
}
}
$data
[
'toUser'
]
=
$send_mail_array
;
// 收件人
$cc_send_mail_array
=
Config
(
'config.cc_email'
);
// 固定抄送人
$cc_send_mail_array
=
Config
(
'config.cc_email'
);
// 固定抄送人
$perm
=
new
PermController
;
$perm
=
new
PermController
;
$manager_email
=
$perm
->
getManager
(
$request
);
// 获取上级主管邮箱
$kefu_manager_email
=
$perm
->
getManager
(
$request
->
user
->
userId
,
63
);
// 获取当前客服的上级主管邮箱,63-销售经理
$kefu_manager_email
&&
$cc_send_mail_array
=
array_merge
(
$cc_send_mail_array
,
$kefu_manager_email
);
// 合并上级主管邮箱
if
(
$manager_email
)
{
$cc_send_mail_array
=
array_merge
(
$cc_send_mail_array
,
$manager_email
);
// 合并上级主管邮箱
}
$cc_send_mail_array
[]
=
$request
->
user
->
email
;
// 默认抄送给自己
$cc_send_mail_array
=
array_unique
(
$cc_send_mail_array
);
// 去重
$cc_email_arr
=
[];
$cc_email_arr
=
[];
...
@@ -2139,49 +2145,69 @@ Class OrderController extends Controller
...
@@ -2139,49 +2145,69 @@ Class OrderController extends Controller
$email
&&
$cc_email_arr
[]
=
$email
;
$email
&&
$cc_email_arr
[]
=
$email
;
}
}
}
}
$cc_send_mail_array
=
array_unique
(
array_merge
(
$cc_send_mail_array
,
$cc_email_arr
));
$data
[
'ccUser'
]
=
array_unique
(
array_merge
(
$cc_send_mail_array
,
$cc_email_arr
));
// 各个采购邮件推入队列
$data
[
'combined'
]
=
$info
[
'order_info'
][
'order_amount'
];
foreach
(
$send_buyers
as
$k
=>
&
$v
)
{
$data
[
'order_amount'
]
=
$info
[
'order_info'
][
'order_amount'
];
$v
[
'combined'
]
=
0
;
$data
[
'date'
]
=
date
(
'Y-m-d'
,
time
());
$data
[
'kefu_remark'
]
=
$info
[
'order_temp_info'
][
'kefu_remark'
];
// 客服备注
$CmsModel
=
new
CmsModel
();
foreach
(
$v
[
'data'
]
as
$item
)
{
$data
[
'id'
]
=
$CmsModel
->
getUserName
(
$info
[
'order_info'
][
'sale_id'
]);
//获取业务员
$v
[
'combined'
]
+=
$item
[
'totalPrice'
];
$data
[
'order_id'
]
=
intval
(
$id
);
}
$data
[
'operator_id'
]
=
intval
(
$request
->
user
->
userId
);
$data
[
'operator_event'
]
=
'发送邮件成功,收件人邮箱:'
.
json_encode
(
$send_mail_array
)
.
',抄送人邮箱:'
.
json_encode
(
$data
[
'ccUser'
]);
// 推入到邮件队列
// 若不属于自营采购部,则添加联营采购管理人员
$QueuedModel
=
new
QueuedModel
();
if
(
!
$perm
->
checkUserDepartment
(
$k
,
51
))
{
$joint_purchase_manager
=
Config
(
'config.joint_purchase_manager'
);
$cc_send_mail_array
=
array_merge
(
$cc_send_mail_array
,
$joint_purchase_manager
);
}
$queued_name
=
'send_buyer_mail'
;
array_push
(
$cc_send_mail_array
,
$request
->
user
->
email
);
// 默认抄送给当前客服
$cc_send_mail_array
=
array_unique
(
$cc_send_mail_array
);
$v
[
'ccUser'
]
=
$cc_send_mail_array
;
$QueuedModel
->
pushAmq
(
'ichunt_order_msg'
,
$queued_name
,
$queued_name
,
json_encode
(
$data
));
$this
->
pushQueue
(
$v
);
}
return
[
'errcode'
=>
0
,
'errmsg'
=>
'推送到邮件队列成功,请稍等...'
];
// $data['toUser'] = $request->user->email; // 收件人
// $data['ccUser'] = $cc_send_mail_array;
// $crm_url = Config('website.crm_domain').'/api/sendCaiGouEmailByOrderAdmin';
// $data['combined'] = $info['order_info']['order_amount'];
// $data['order_amount'] = $info['order_info']['order_amount'];
// $data = json_encode($data);
// $data['date'] = date('Y-m-d',time());
// $data['id'] = $sale_name;
// $data['order_id'] = intval($id);
// $data['operator_id'] = intval($request->user->userId);
// $data['operator_event'] = '发送邮件成功,收件人邮箱:'.json_encode($data['toUser']).',抄送人邮箱:'.json_encode($data['ccUser']);
// $this->pushQueue($data);
$event
=
'发送邮件成功,收件人邮箱:'
.
json_encode
(
$to_user_array
)
.
',抄送人邮箱:'
.
json_encode
(
$cc_send_mail_array
);
// $crm_header = array('api-key: crm a1b2c3d4e5f6g7h8i9jk');
// 添加操作日志
$OrderActionLogModel
=
new
OrderActionLogModel
;
$OrderActionLogModel
->
addLog
(
$id
,
$request
->
user
->
userId
,
2
,
$event
);
// $res = json_decode(post_curl($crm_url, $data,$crm_header));
// 同步到ERP
$url
=
Config
(
'website.api_domain'
)
.
'order/sysiteminfo'
;
// if(!empty($res->err_code) && $res->err_code == 0){
$resData
[
'order_id'
]
=
$id
;
// // 操作日志
$resData
[
'k1'
]
=
time
();
// $OrderActionLogModel = new OrderActionLogModel(
);
$resData
[
'k2'
]
=
md5
(
md5
(
$resData
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
// $event = '发送邮件成功,收件人邮箱:'.json_encode($send_mail_array).',抄送人邮箱:'.json_encode($data['ccUser']);
$temp
=
json_decode
(
curlApi
(
$url
,
$resData
,
"POST"
),
true
);
// 连接API
// $actionLog = $OrderActionLogModel->addLog($id, $request->user->userId, 2, $event);
// echo json_encode(['errcode'=>1,'errmsg'=>'发送成功']);
if
(
$temp
[
'err_code'
]
!=
0
)
return
[
'errcode'
=>
$temp
[
'err_code'
],
'errmsg'
=>
$temp
[
'err_msg'
]];
// exit;
// }else{
return
[
'errcode'
=>
0
,
'errmsg'
=>
'推送到邮件队列成功,请稍等...'
];
// echo json_encode(['errcode'=>-1,'errmsg'=>'邮件发送接口错误,邮件发送失败']);
}
// exit;
// }
public
function
pushQueue
(
$data
)
{
// 推入到邮件队列
$QueuedModel
=
new
QueuedModel
();
$queued_name
=
'send_buyer_mail'
;
$QueuedModel
->
pushAmq
(
'ichunt_order_msg'
,
$queued_name
,
$queued_name
,
json_encode
(
$data
));
}
}
}
}
\ No newline at end of file
app/Http/Controllers/PermController.php
View file @
05b2beab
...
@@ -344,29 +344,57 @@
...
@@ -344,29 +344,57 @@
// }
// }
// 获取角色对应的主管邮箱
// 获取角色对应的主管邮箱
public
function
getManager
(
$request
)
//
public function getManager($request)
{
//
{
$role
=
$this
->
getUserRole
(
$request
);
// 当前用户角色
//
$role = $this->getUserRole($request); // 当前用户角色
$manager_key
=
array_search
(
$role
,
Config
(
'perm_args.manager_to_kefu'
));
// 获取对应的主管key
//
$manager_key = array_search($role, Config('perm_args.manager_to_kefu')); // 获取对应的主管key
if
(
!
$manager_key
)
return
false
;
//
if (!$manager_key) return false;
$role_name
=
array_search
(
$manager_key
,
Config
(
'perm_args.roles'
));
// 获取主管对应的角色名称
//
$role_name = array_search($manager_key, Config('perm_args.roles')); // 获取主管对应的角色名称
if
(
!
$role_name
)
return
false
;
//
if (!$role_name) return false;
$res
=
$this
->
getRoleUsers
(
$request
,
$role_name
);
// 获取角色对应的用户
//
$res = $this->getRoleUsers($request, $role_name); // 获取角色对应的用户
$email
=
[];
//
$email = [];
if
(
$res
)
{
// if ($res) {
foreach
(
$res
as
$v
)
{
// foreach ($res as $v) {
$email
[]
=
$v
->
email
;
// $email[] = $v->email;
}
// }
// }
// return $email;
// }
/**
* 获取角色对应的主管邮箱
* @param [type] $userId [description]
* @param [type] $position_id [主管ID]
* @return [type] [description]
*/
public
function
getManager
(
$userId
,
$position_id
)
{
// 获取当前所在部门
$department_id
=
DB
::
table
(
'user_info'
)
->
where
(
'userId'
,
$userId
)
->
value
(
'department_id'
);
if
(
!
$department_id
)
return
false
;
$map
=
[];
$map
[
'department_id'
]
=
$department_id
;
$map
[
'position_id'
]
=
$position_id
;
$email
=
DB
::
table
(
'user_info'
)
->
where
(
$map
)
->
select
(
'email'
)
->
get
();
if
(
empty
(
$email
))
return
false
;
foreach
(
$email
as
$v
)
{
$data
[]
=
$v
->
email
;
}
}
return
$
email
;
return
$
data
;
}
}
/* 订单系统权限调整 --- 20200511 */
/* 订单系统权限调整 --- 20200511 */
...
@@ -434,7 +462,7 @@
...
@@ -434,7 +462,7 @@
return
DB
::
table
(
'user_info'
)
->
where
(
$map
)
->
select
(
'userId'
,
'name'
,
'position_id'
,
'position_name'
,
'department_id'
,
'department_name'
,
'status'
)
->
get
();
return
DB
::
table
(
'user_info'
)
->
where
(
$map
)
->
select
(
'userId'
,
'name'
,
'position_id'
,
'position_name'
,
'department_id'
,
'department_name'
,
'status'
)
->
get
();
}
}
// 获取下级所有人员
// 获取
指定用户
下级所有人员
public
function
getSubSaleId
(
$userId
)
public
function
getSubSaleId
(
$userId
)
{
{
$sale_ids
=
[];
$sale_ids
=
[];
...
@@ -490,5 +518,15 @@
...
@@ -490,5 +518,15 @@
return
$user
;
return
$user
;
}
}
// 检查用户是否属于某部门
public
function
checkUserDepartment
(
$userId
,
$department_id
)
{
$map
=
[];
$map
[
'userId'
]
=
$userId
;
$map
[
'department_id'
]
=
$department_id
;
return
DB
::
table
(
'user_info'
)
->
where
(
$map
)
->
select
(
'userId'
)
->
first
();
}
}
}
\ No newline at end of file
app/Http/Controllers/ReturnController.php
View file @
05b2beab
...
@@ -126,7 +126,7 @@ class ReturnController extends Controller
...
@@ -126,7 +126,7 @@ class ReturnController extends Controller
$map
[
'sale_id'
]
=
$request
->
input
(
'sale_id'
,
''
);
$map
[
'sale_id'
]
=
$request
->
input
(
'sale_id'
,
''
);
// 非管理员、查看下级,只能看到自己的退货单
// 非管理员、查看下级,只能看到自己的退货单
if
(
!
in_array
(
$info
[
'role'
],
[
1
,
2
])
)
{
if
(
$info
[
'role'
]
==
3
)
{
$map
[
'create_uid'
]
=
$request
->
user
->
userId
;
$map
[
'create_uid'
]
=
$request
->
user
->
userId
;
}
}
...
...
app/Http/routes.php
View file @
05b2beab
...
@@ -43,6 +43,7 @@ Route::group(['middleware' => 'web'], function () {
...
@@ -43,6 +43,7 @@ Route::group(['middleware' => 'web'], function () {
Route
::
match
([
'get'
,
'post'
],
'/sendSales/{id?}'
,
'OrderController@sendSales'
);
Route
::
match
([
'get'
,
'post'
],
'/sendSales/{id?}'
,
'OrderController@sendSales'
);
Route
::
post
(
'/ajaxdeletegoods'
,
'OrderController@ajaxdeletegoods'
);
Route
::
post
(
'/ajaxdeletegoods'
,
'OrderController@ajaxdeletegoods'
);
Route
::
post
(
'/ajaxSaveChange'
,
'OrderController@ajaxSaveChange'
);
Route
::
post
(
'/ajaxSaveChange'
,
'OrderController@ajaxSaveChange'
);
Route
::
post
(
'/ajaxApplyManagerAudit'
,
'OrderController@ajaxApplyManagerAudit'
);
Route
::
post
(
'/ajaxAuditPass'
,
'OrderController@ajaxAuditPass'
);
Route
::
post
(
'/ajaxAuditPass'
,
'OrderController@ajaxAuditPass'
);
Route
::
post
(
'/ajaxReAudit'
,
'OrderController@ajaxReAudit'
);
Route
::
post
(
'/ajaxReAudit'
,
'OrderController@ajaxReAudit'
);
Route
::
get
(
'/check/{id}'
,
'OrderController@check'
);
Route
::
get
(
'/check/{id}'
,
'OrderController@check'
);
...
...
app/Model/OrderModel.php
View file @
05b2beab
...
@@ -335,6 +335,7 @@ class OrderModel extends Model
...
@@ -335,6 +335,7 @@ class OrderModel extends Model
'1'
=>
'自采'
,
'1'
=>
'自采'
,
'2'
=>
'立创'
,
'2'
=>
'立创'
,
'3'
=>
'京北'
,
'3'
=>
'京北'
,
'4'
=>
'油柑网'
,
);
);
$tmp
=
array
();
$tmp
=
array
();
...
@@ -461,7 +462,7 @@ class OrderModel extends Model
...
@@ -461,7 +462,7 @@ class OrderModel extends Model
$tmp
[
$i
][
'sale_type'
]
=
$order
[
$i
][
'sale_type'
]
==
1
?
'现卖'
:
'预售'
;
$tmp
[
$i
][
'sale_type'
]
=
$order
[
$i
][
'sale_type'
]
==
1
?
'现卖'
:
'预售'
;
// 自营其他业务类型
// 自营其他业务类型
$tmp
[
$i
][
'business_type'
]
=
$order
[
$i
][
'business_type'
]
?
Config
(
'params.business_type'
)[
$order
[
$i
][
'business_type'
]]
:
'正常订单'
;
$tmp
[
$i
][
'business_type'
]
=
$order
[
$i
][
'business_type'
]
?
Config
(
'params.business_type'
)[
$order
[
$i
][
'business_type'
]]
:
'正常订单'
;
$tmp
[
$i
][
'self_supplier_type'
]
=
$self_supplier_type
[
$order
[
$i
][
'self_supplier_type'
]]
;
// 自采标记
$tmp
[
$i
][
'self_supplier_type'
]
=
isset
(
$self_supplier_type
[
$order
[
$i
][
'self_supplier_type'
]])
?
$self_supplier_type
[
$order
[
$i
][
'self_supplier_type'
]]
:
'未知'
;
// 自采标记
$tmp
[
$i
][
'sample_demand_desc'
]
=
$order
[
$i
][
'sample_demand_desc'
];
// 样片项目需求描述
$tmp
[
$i
][
'sample_demand_desc'
]
=
$order
[
$i
][
'sample_demand_desc'
];
// 样片项目需求描述
//收货地址的电话
//收货地址的电话
$tmp
[
$i
][
'receiving_address'
]
=
isset
(
$current_order_addr
[
'mobile'
])
?
$current_order_addr
[
'mobile'
]
:
''
;
$tmp
[
$i
][
'receiving_address'
]
=
isset
(
$current_order_addr
[
'mobile'
])
?
$current_order_addr
[
'mobile'
]
:
''
;
...
...
config/config.php
View file @
05b2beab
...
@@ -23,4 +23,9 @@ return [
...
@@ -23,4 +23,9 @@ return [
// 'zoe@ichunt.com',
// 'zoe@ichunt.com',
],
],
// 联营采购负责人
'joint_purchase_manager'
=>
[
'zty@ichunt.com'
,
],
];
];
public/js/order_audit.js
View file @
05b2beab
...
@@ -4,6 +4,48 @@
...
@@ -4,6 +4,48 @@
$
.
extend
(
$
.
lie
,
{
$
.
extend
(
$
.
lie
,
{
audit
:
{
audit
:
{
index
:
function
()
{
index
:
function
()
{
// 申请主管审核
$
(
'.apply-manager-audit'
).
click
(
function
()
{
var
order_id
=
$
(
this
).
data
(
'id'
);
// 弹出提示
layer
.
open
({
area
:
[
'360px'
],
title
:
'提示信息'
,
content
:
'确定申请主管审核吗?'
,
btn
:[
'确定'
,
'取消'
],
yes
:
function
(
index
,
layero
){
$
.
ajax
({
url
:
'/ajaxApplyManagerAudit'
,
type
:
'post'
,
data
:
{
order_id
:
order_id
},
dataType
:
'json'
,
success
:
function
(
resp
)
{
if
(
resp
.
errcode
===
0
){
layer
.
msg
(
resp
.
errmsg
||
'操作成功'
);
setTimeout
(
function
(){
location
.
reload
();
},
1000
);
return
false
;
}
layer
.
alert
(
resp
.
errmsg
);
return
false
;
},
error
:
function
(
res
)
{
console
.
log
(
res
);
}
})
layer
.
msg
(
'申请中...'
,
{
icon
:
16
,
time
:
0
,
shade
:
0.3
});
// 阻止重复提交
},
btn2
:
function
(
index
,
layero
){
layer
.
close
(
index
);
}
});
})
// 主管审核
// 主管审核
$
(
'.manager-audit'
).
click
(
function
()
{
$
(
'.manager-audit'
).
click
(
function
()
{
var
order_id
=
$
(
this
).
data
(
'id'
);
var
order_id
=
$
(
this
).
data
(
'id'
);
...
...
public/js/order_send_email.js
View file @
05b2beab
...
@@ -52,6 +52,8 @@
...
@@ -52,6 +52,8 @@
layer
.
alert
(
'网络异常'
);
layer
.
alert
(
'网络异常'
);
}
}
});
});
layer
.
msg
(
'推送中...'
,
{
icon
:
16
,
time
:
0
,
shade
:
0.3
});
},
},
btn2
:
function
(
index
){
btn2
:
function
(
index
){
layer
.
close
(
index
);
layer
.
close
(
index
);
...
...
public/js/refund.js
View file @
05b2beab
...
@@ -387,7 +387,7 @@
...
@@ -387,7 +387,7 @@
$
(
'.return_num'
).
keyup
(
function
()
{
$
(
'.return_num'
).
keyup
(
function
()
{
var
removal_number
=
parseInt
(
$
(
this
).
parents
(
'tr'
).
find
(
'.removal_number'
).
val
());
// 出库数量
var
removal_number
=
parseInt
(
$
(
this
).
parents
(
'tr'
).
find
(
'.removal_number'
).
val
());
// 出库数量
var
single_pre_price
=
parseFloat
(
$
(
this
).
parents
(
'tr'
).
find
(
'.single_pre_price'
).
val
());
// 均摊单价
var
single_pre_price
=
parseFloat
(
$
(
this
).
parents
(
'tr'
).
find
(
'.single_pre_price'
).
val
());
// 均摊单价
var
pay_amount
=
$
(
'.pay_amount'
).
val
(
);
var
pay_amount
=
parseFloat
(
$
(
'.pay_amount'
).
val
()
);
var
val
=
$
(
this
).
val
();
// 退货数量
var
val
=
$
(
this
).
val
();
// 退货数量
if
(
val
>
removal_number
)
{
if
(
val
>
removal_number
)
{
...
...
resources/views/changeOrder/content.blade.php
View file @
05b2beab
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<div
class=
"tabs-box"
>
<div
class=
"tabs-box"
>
<div
class=
"order-change-main"
>
<div
class=
"order-change-main"
>
@if (($order_info['order_goods_type'] == 1
&&
$order_info['status'] == 1
) || ($order_info['order_goods_type'] == 2
&&
$order_info['adjust_count']
<
2
))
@if (($order_info['order_goods_type'] == 1
&&
in_array($order_info['status'], [1, 2])
&&
$order_temp_info['is_manager_audit'] != 3
) || ($order_info['order_goods_type'] == 2
&&
$order_info['adjust_count']
<
2
))
<
form
id=
"checkOrderForm"
class=
"form-horizontal table-responsive"
>
<
form
id=
"checkOrderForm"
class=
"form-horizontal table-responsive"
>
<input
type=
"hidden"
name=
"auditor_role"
value=
"{{ $role }}"
>
<input
type=
"hidden"
name=
"auditor_role"
value=
"{{ $role }}"
>
<input
type=
"hidden"
name=
"order_sn"
value=
"{{$order_info['order_sn']}}"
>
<input
type=
"hidden"
name=
"order_sn"
value=
"{{$order_info['order_sn']}}"
>
...
@@ -396,7 +396,7 @@
...
@@ -396,7 +396,7 @@
</form>
</form>
@endif
@endif
@if (($order_info['order_goods_type'] == 1
&&
$order_info['status'] == 2
) || ($order_info['order_goods_type'] != 1
&&
$order_info['adjust_count'] == 2))
@if (($order_info['order_goods_type'] == 1
&&
$order_info['status'] == 2
&&
$order_temp_info['is_manager_audit'] == 3) || ($order_info['order_goods_type'] == 2
&&
$order_info['status'] == 2
&&
$order_info['adjust_count'] == 2))
<div
class=
"checked_section"
>
<div
class=
"checked_section"
>
<div
class=
"checked_left"
>
<div
class=
"checked_left"
>
<p>
交易状态:
审核通过,请联系客户及时付款!
<p>
交易状态:
审核通过,请联系客户及时付款!
...
@@ -416,7 +416,7 @@
...
@@ -416,7 +416,7 @@
@if ($order_info['order_goods_type'] == 2
&&
$order_info['adjust_count']
<
2
)
@if ($order_info['order_goods_type'] == 2
&&
$order_info['adjust_count']
<
2
)
<
a
class=
"btn btn-default"
href=
"{{$adjustPriceUrl}}"
>
再次调价
</a><span
class=
"warn-tip"
>
每笔订单仅有一次“再次调价”机会
</span>
<
a
class=
"btn btn-default"
href=
"{{$adjustPriceUrl}}"
>
再次调价
</a><span
class=
"warn-tip"
>
每笔订单仅有一次“再次调价”机会
</span>
@elseif ($order_info['order_goods_type'] == 1)
@elseif ($order_info['order_goods_type'] == 1)
<
a
class=
"btn btn-default"
href=
"{{$adjustPriceUrl}}"
>
再次调价
</a
>
<
!-- <a class="btn btn-default" href="{{$adjustPriceUrl}}">再次调价</a> --
>
@endif
@endif
</div>
</div>
...
@@ -486,7 +486,7 @@
...
@@ -486,7 +486,7 @@
@include('changeOrder.addGoodsNoSkuid')
@include('changeOrder.addGoodsNoSkuid')
<script>
<script>
var
is_manager
=
"{{ in_array($role, [1, 2]) ? true : false }}"
;
var
is_manager
=
"{{ in_array($role, [1, 2
, 5
]) ? true : false }}"
;
var
isNewClient
=
"{{isset($isNewClient) ? $isNewClient : 0}}"
;
var
isNewClient
=
"{{isset($isNewClient) ? $isNewClient : 0}}"
;
// var order_amount = "{{$order_info['order_amount']}}";
// var order_amount = "{{$order_info['order_amount']}}";
...
...
resources/views/detail/content.blade.php
View file @
05b2beab
...
@@ -157,15 +157,20 @@
...
@@ -157,15 +157,20 @@
@endif
@endif
@if (in_array('check_order', $userPerms)
&&
$order_info['sale_id'])
@if (in_array('check_order', $userPerms)
&&
$order_info['sale_id'])
@if (
$order_info['status'] == 1
)
@if (
isset($order_temp_info['is_manager_audit'])
&&
$order_temp_info['is_manager_audit'] != 3
&&
in_array($order_info['status'], [1, 2])
)
<a
class=
"btn btn-success"
href=
"{{URL('change', ['order_id'=>$order_info['order_id']])}}"
target=
"_blank"
>
人工审单
</a>
<a
class=
"btn btn-success"
href=
"{{URL('change', ['order_id'=>$order_info['order_id']])}}"
target=
"_blank"
>
人工审单
</a>
@elseif ($order_info['status'] == 2
&&
in_array($role, [1, 2]))
@elseif ($order_info['status'] == 2
&&
$order_temp_info['is_manager_audit'] == 3
&&
in_array($role, [1, 2]))
<a
class=
"btn btn-success re-audit"
data-id=
"{{$order_info['order_id']}}"
>
反审
</a>
<a
class=
"btn btn-success re-audit"
data-id=
"{{$order_info['order_id']}}"
>
反审
</a>
@endif
@endif
@endif
@endif
<!-- 申请主管审核 -->
@if (isset($order_temp_info['is_manager_audit'])
&&
$order_temp_info['is_manager_audit'] == 1
&&
$order_info['status'] == 2)
<a
class=
"btn btn-info apply-manager-audit"
data-id=
"{{$order_info['order_id']}}"
>
申请主管审核
</a>
@endif
<!-- 主管审核 -->
<!-- 主管审核 -->
@if (
$order_temp_info['is_manager_audit']
&&
in_array($role, [1, 2])
&&
$order_info['status'] == 1
)
@if (
isset($order_temp_info['is_manager_audit'])
&&
(($order_info['status'] == 2
&&
$order_temp_info['is_manager_audit'] == 2) || ($order_info['status'] > 2
&&
$order_temp_info['is_manager_audit'] != 3))
&&
in_array($role, [1, 2])
&&
empty($order_temp_info['erp_sn'])
)
<a
class=
"btn btn-danger manager-audit"
data-id=
"{{$order_info['order_id']}}"
>
主管审核
</a>
<a
class=
"btn btn-danger manager-audit"
data-id=
"{{$order_info['order_id']}}"
>
主管审核
</a>
@endif
@endif
...
...
resources/views/detail/detail_action_log.php
View file @
05b2beab
<style>
.action_log_event
{
word-break
:
break-all
;
}
</style>
<p>
操作记录
</p>
<p>
操作记录
</p>
<div
class=
"tabs-box table-responsive"
>
<div
class=
"tabs-box table-responsive"
>
<table
class=
"table table-bordered table-hover"
>
<table
class=
"table table-bordered table-hover"
>
...
@@ -14,13 +18,13 @@
...
@@ -14,13 +18,13 @@
<tr>
<tr>
<td
width=
"15%"
>
<?=
date
(
'Y-m-d H:i:s'
,
$v
->
create_time
)
?>
</td>
<td
width=
"15%"
>
<?=
date
(
'Y-m-d H:i:s'
,
$v
->
create_time
)
?>
</td>
<td
width=
"10%"
>
<?=
App\Http\Controllers\getOperatorName
(
$v
->
operator_id
,
$v
->
operator_type
)
?>
</td>
<td
width=
"10%"
>
<?=
App\Http\Controllers\getOperatorName
(
$v
->
operator_id
,
$v
->
operator_type
)
?>
</td>
<td>
<?=
$v
->
event
?>
</td>
<td
class=
"action_log_event"
>
<?=
$v
->
event
?>
</td>
</tr>
</tr>
<?php
}
else
{
?>
<?php
}
else
{
?>
<tr
class=
"other-infos"
>
<tr
class=
"other-infos"
>
<td
width=
"15%"
>
<?=
date
(
'Y-m-d H:i:s'
,
$v
->
create_time
)
?>
</td>
<td
width=
"15%"
>
<?=
date
(
'Y-m-d H:i:s'
,
$v
->
create_time
)
?>
</td>
<td
width=
"10%"
>
<?=
App\Http\Controllers\getOperatorName
(
$v
->
operator_id
,
$v
->
operator_type
)
?>
</td>
<td
width=
"10%"
>
<?=
App\Http\Controllers\getOperatorName
(
$v
->
operator_id
,
$v
->
operator_type
)
?>
</td>
<td>
<?=
$v
->
event
?>
</td>
<td
class=
"action_log_event"
>
<?=
$v
->
event
?>
</td>
</tr>
</tr>
<?php
}
?>
<?php
}
?>
...
...
resources/views/detail/detail_base_info.blade.php
View file @
05b2beab
...
@@ -30,12 +30,12 @@
...
@@ -30,12 +30,12 @@
<th>
发货状态
</th>
<th>
发货状态
</th>
<th>
物流单号
</th>
<th>
物流单号
</th>
<th>
京东订单编号
</th>
<th>
京东订单编号
</th>
<th
width=
"8%"
>
自动确认收货时间
</th>
<th>
自动确认收货时间
</th>
</tr>
</tr>
<tr>
<tr>
<td>
{{ $order_info['order_sn'] }}
</td>
<td>
{{ $order_info['order_sn'] }}
</td>
<td>
{{
$order_temp_info['is_manager_audit'] ? '待主管审核' :
Config('params.order_status')[$order_info['status']] }}
</td>
<td>
{{ Config('params.order_status')[$order_info['status']] }}
</td>
<td>
{{ $user_info['mobile'] ? $user_info['mobile'] : $user_info['email'] }}
</td>
<td>
{{ $user_info['mobile'] ? $user_info['mobile'] : $user_info['email'] }}
</td>
<td>
<td>
<?php
<?php
...
...
resources/views/detail/detail_items_info.php
View file @
05b2beab
...
@@ -143,7 +143,7 @@
...
@@ -143,7 +143,7 @@
<td>
<td>
<!-- <button type="button" class="btn btn-success btn-xs remarks">编辑</button> -->
<!-- <button type="button" class="btn btn-success btn-xs remarks">编辑</button> -->
<?php
if
(
in_array
(
$order_info
[
'status'
],
[
1
,
2
,
3
])
&&
$v
[
'status'
]
==
1
)
{
?>
<?php
if
(
in_array
(
$order_info
[
'status'
],
[
1
,
2
,
3
,
4
])
&&
$v
[
'status'
]
==
1
)
{
?>
<button
type=
"button"
class=
"btn btn-success btn-xs edit-item"
data-id=
"
<?=
$v
[
'rec_id'
]
?>
"
data-batch=
"
<?=
$v
[
'batch'
]
?>
"
data-bid=
"
<?=
$v
[
'buyer_id'
]
?>
"
data-remarks=
"
<?=
$v
[
'remarks'
]
?>
"
>
编辑
</button>
<button
type=
"button"
class=
"btn btn-success btn-xs edit-item"
data-id=
"
<?=
$v
[
'rec_id'
]
?>
"
data-batch=
"
<?=
$v
[
'batch'
]
?>
"
data-bid=
"
<?=
$v
[
'buyer_id'
]
?>
"
data-remarks=
"
<?=
$v
[
'remarks'
]
?>
"
>
编辑
</button>
<?php
}
?>
<?php
}
?>
</td>
</td>
...
...
resources/views/detail/detail_multi_info.php
View file @
05b2beab
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<th
colspan=
"8"
style=
"text-align: center; background: #f9f9f9;"
>
发票信息
<th
colspan=
"8"
style=
"text-align: center; background: #f9f9f9;"
>
发票信息
<?php
<?php
//<!-- 发票状态小于2(已发货)且更改权限存在 显示按钮 -->
//<!-- 发票状态小于2(已发货)且更改权限存在 显示按钮 -->
if
(
!
isset
(
$tags
))
{
if
(
empty
(
$tags
))
{
if
(
in_array
(
$order_info
[
'status'
],
[
1
,
2
,
3
,
4
])
&&
$order_invoice_info
[
'invoice_status'
]
<
2
&&
in_array
(
'update_invoice'
,
$userPerms
))
{
if
(
in_array
(
$order_info
[
'status'
],
[
1
,
2
,
3
,
4
])
&&
$order_invoice_info
[
'invoice_status'
]
<
2
&&
in_array
(
'update_invoice'
,
$userPerms
))
{
echo
'<a href="/changeInvoice/'
.
$order_info
[
'order_id'
]
.
'" class="btn btn-success btn-sm changeBtn">更改发票</a>'
;
echo
'<a href="/changeInvoice/'
.
$order_info
[
'order_id'
]
.
'" class="btn btn-success btn-sm changeBtn">更改发票</a>'
;
}
}
...
...
resources/views/detail/js.blade.php
View file @
05b2beab
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<script
src=
"/js/md5.js"
></script>
<script
src=
"/js/md5.js"
></script>
<script
src=
"/js/layui/layui.js"
></script>
<script
src=
"/js/layui/layui.js"
></script>
<script
src=
"/js/details.js?v=
<?=
time
()
?>
"
></script>
<script
src=
"/js/details.js?v=
<?=
time
()
?>
"
></script>
<script
src=
"/js/order_audit.js"
></script>
<script
src=
"/js/order_audit.js
?v=
<?=
time
()
?>
"
></script>
<script
src=
"/js/order_track.js"
></script>
<script
src=
"/js/order_track.js"
></script>
<script
src=
"/js/order_cancel.js"
></script>
<script
src=
"/js/order_cancel.js"
></script>
<script
src=
"/js/order_send_email.js"
></script>
<script
src=
"/js/order_send_email.js"
></script>
...
...
resources/views/orderlist/content.blade.php
View file @
05b2beab
...
@@ -250,12 +250,13 @@
...
@@ -250,12 +250,13 @@
<th
class=
"pl30"
>
ERP单号
</th>
<th
class=
"pl30"
>
ERP单号
</th>
<th
class=
"pl30"
>
应付金额
</th>
<th
class=
"pl30"
>
应付金额
</th>
<th
class=
"pl30"
>
订单状态
</th>
<th
class=
"pl30"
>
订单状态
</th>
<th
class=
"pl30"
>
主管审核
</th>
<th
class=
"pl30"
>
付款类型
</th>
<th
class=
"pl30"
>
付款类型
</th>
<th
class=
"pl30"
>
支付方式
</th>
<th
class=
"pl30"
>
支付方式
</th>
<th
class=
"pl30"
>
业务员
</th>
<th
class=
"pl30"
>
业务员
</th>
@if ($username != 'vpadmin@ichunt.com')
@if ($username != 'vpadmin@ichunt.com')
<th
class=
"pl30"
>
订单来源
</th>
<th
class=
"pl30"
>
订单来源
</th>
<
th
class=
"pl30"
>
同步状态
</th
>
<
!-- <th class="pl30">同步状态</th> --
>
<th
class=
"pl30"
>
收货人
</th>
<th
class=
"pl30"
>
收货人
</th>
@endif
@endif
<th
class=
"pl30"
>
下单时间
</th>
<th
class=
"pl30"
>
下单时间
</th>
...
@@ -288,24 +289,36 @@
...
@@ -288,24 +289,36 @@
?>
?>
</td>
</td>
<td
class=
"show-list"
>
<td
class=
"show-list"
>
<?php
<?php
if
(
$order_extend
->
is_manager_audit
)
{
switch
(
$v
[
'status'
])
{
echo
'<span class="list-text-checking"><b>待主管审核</b></span>'
;
case
-
2
:
echo
'<span class="list-text-no-check"><b>审核未通过</b></span>'
;
break
;
}
else
{
case
-
1
:
echo
'<span class="list-text-cancel"><b>已取消</b></span>'
;
break
;
switch
(
$v
[
'status'
])
{
case
1
:
echo
'<span class="list-text-checking"><b>待审核</b></span>'
;
break
;
case
-
2
:
echo
'<span class="list-text-no-check"><b>审核未通过</b></span>'
;
break
;
case
2
:
echo
'<span class="list-text-pay"><b>待付款</b></span>'
;
break
;
case
-
1
:
echo
'<span class="list-text-cancel"><b>已取消</b></span>'
;
break
;
case
3
:
echo
'<span class="list-text-last-pay"><b>待付尾款</b></span>'
;
break
;
case
1
:
echo
'<span class="list-text-checking"><b>待审核</b></span>'
;
break
;
case
4
:
echo
'<span class="list-text-send"><b>待发货</b></span>'
;
break
;
case
2
:
echo
'<span class="list-text-pay"><b>待付款</b></span>'
;
break
;
case
7
:
echo
'<span class="list-text-send"><b>部分发货</b></span>'
;
break
;
case
3
:
echo
'<span class="list-text-last-pay"><b>待付尾款</b></span>'
;
break
;
case
8
:
echo
'<span class="list-text-confirm"><b>待收货</b></span>'
;
break
;
case
4
:
echo
'<span class="list-text-send"><b>待发货</b></span>'
;
break
;
case
10
:
echo
'<span class="list-text-success"><b>交易成功</b></span>'
;
break
;
case
7
:
echo
'<span class="list-text-send"><b>部分发货</b></span>'
;
break
;
}
case
8
:
echo
'<span class="list-text-confirm"><b>待收货</b></span>'
;
break
;
case
10
:
echo
'<span class="list-text-success"><b>交易成功</b></span>'
;
break
;
}
}
?>
?>
</td>
</td>
<td
class=
"show-list"
>
<?php
if
(
$v
[
'status'
]
>=
1
&&
isset
(
$order_extend
->
is_manager_audit
))
{
switch
(
$order_extend
->
is_manager_audit
)
{
case
1
:
echo
'<span class="list-text-checking"><b>未申请</b></span>'
;
break
;
case
2
:
echo
'<span class="list-text-checking"><b>待审核</b></span>'
;
break
;
case
3
:
echo
'<span class="list-text-success"><b>已审核</b></span>'
;
break
;
default
:
echo
''
;
break
;
}
}
?>
</td>
<td
class=
"show-list"
>
{{ Config('params.order_pay_type')[$v['order_pay_type']] }}
</td>
<td
class=
"show-list"
>
{{ Config('params.order_pay_type')[$v['order_pay_type']] }}
</td>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getPayName
(
$v
[
'order_id'
]));
?>
</td>
<td
class=
"show-list"
>
<?php
print_r
(
App\Http\Controllers\getPayName
(
$v
[
'order_id'
]));
?>
</td>
...
@@ -314,40 +327,45 @@
...
@@ -314,40 +327,45 @@
@if ($username != 'vpadmin@ichunt.com')
@if ($username != 'vpadmin@ichunt.com')
<td
class=
"show-list"
>
<?php
echo
App\Http\Controllers\getOrderSource
(
$v
[
'order_id'
],
$v
[
'order_type'
]);
?>
</td>
<td
class=
"show-list"
>
<?php
echo
App\Http\Controllers\getOrderSource
(
$v
[
'order_id'
],
$v
[
'order_type'
]);
?>
</td>
<td
class=
"show-list"
>
<
!-- <
td class="show-list">
<?php
<?php
if
(
in_array
(
$v
[
'status'
],
[
-
1
,
1
]))
{
//
if (in_array($v['status'], [-1, 1])) {
echo
'不需同步'
;
//
echo '不需同步';
}
else
{
//
} else {
echo
$v
[
'erp_order_id'
]
!=
''
&&
$v
[
'erp_order_id'
]
!=
'-'
?
'<span class="list-text-success"><b>已同步</b></span>'
:
'<span class="list-text-checking"><b>未同步</b></span>'
;
//
echo $v['erp_order_id'] != '' && $v['erp_order_id'] != '-' ? '<span class="list-text-success"><b>已同步</b></span>' : '<span class="list-text-checking"><b>未同步</b></span>';
}
//
}
?>
?>
</td>
</td>
-->
<td
class=
"show-list"
>
<?php
echo
App\Http\Controllers\getOrderAddress
(
$v
[
'order_id'
]);
?>
</td>
<td
class=
"show-list"
>
<?php
echo
App\Http\Controllers\getOrderAddress
(
$v
[
'order_id'
]);
?>
</td>
@endif
@endif
<td
class=
"show-list"
>
{{$username != 'vpadmin@ichunt.com' ? date('Y-m-d H:i:s', $v['create_time']) : date('Y-m-d', $v['create_time'])}}
</td>
<td
class=
"show-list"
>
{{$username != 'vpadmin@ichunt.com' ? date('Y-m-d H:i:s', $v['create_time']) : date('Y-m-d', $v['create_time'])}}
</td>
<td>
<td>
<div
class=
"btn-group btn-group-xs"
style=
"width: 260px;"
>
<div
class=
"btn-group btn-group-xs"
style=
"min-width: 200px;"
>
<a
class=
"btn btn-primary"
href=
"{{URL('details', ['order_id'=>$v['order_id']])}}"
target=
"_blank"
>
详情
</a>
@if (in_array('check_order', $userPerms)
&&
$v['sale_id'])
@if (in_array('check_order', $userPerms)
&&
$v['sale_id'])
@if (
$v['status'] == 1
)
@if (
isset($order_extend->is_manager_audit)
&&
$order_extend->is_manager_audit != 3
&&
in_array($v['status'], [1, 2])
)
<a
class=
"btn btn-success"
href=
"{{URL('change', ['order_id'=>$v['order_id']])}}"
target=
"_blank"
>
人工审单
</a>
<a
class=
"btn btn-success"
href=
"{{URL('change', ['order_id'=>$v['order_id']])}}"
target=
"_blank"
>
人工审单
</a>
@elseif ($v['status'] == 2
&&
in_array($role, [1, 2]))
@elseif ($v['status'] == 2
&&
$order_extend->is_manager_audit == 3
&&
in_array($role, [1, 2]))
<a
class=
"btn btn-success re-audit"
data-id=
"{{$v['order_id']}}"
>
反审
</a>
<a
class=
"btn btn-success re-audit"
data-id=
"{{$v['order_id']}}"
>
反审
</a>
@endif
@endif
@endif
@endif
<!-- 主管审核 -->
<!-- 申请主管审核 -->
@if ($order_extend->is_manager_audit
&&
in_array($role, [1, 2])
&&
$v['status'] == 1)
@if (isset($order_extend->is_manager_audit)
&&
$order_extend->is_manager_audit == 1
&&
$v['status'] == 2)
<a
class=
"btn btn-info apply-manager-audit"
data-id=
"{{$v['order_id']}}"
>
申请主管审核
</a>
@endif
<!-- 主管审核 (待付款且待主管审核 || 已付款且主管未审核) && 主管角色 && 未同步 -->
@if (isset($order_extend->is_manager_audit)
&&
(($v['status'] == 2
&&
$order_extend->is_manager_audit == 2) || ($v['status'] > 2
&&
$order_extend->is_manager_audit != 3))
&&
in_array($role, [1, 2])
&&
empty($order_extend->erp_sn))
<a
class=
"btn btn-danger manager-audit"
data-id=
"{{$v['order_id']}}"
>
主管审核
</a>
<a
class=
"btn btn-danger manager-audit"
data-id=
"{{$v['order_id']}}"
>
主管审核
</a>
@endif
@endif
@if (!empty($order_extend->erp_sn))
@if (!empty($order_extend->erp_sn))
<a
class=
"btn btn-
primary
send_mail"
data-id=
"{{ $v['order_id'] }}"
>
发送邮件
</a>
<a
class=
"btn btn-
warning
send_mail"
data-id=
"{{ $v['order_id'] }}"
>
发送邮件
</a>
@endif
@endif
<a
class=
"btn btn-primary"
href=
"{{URL('details', ['order_id'=>$v['order_id']])}}"
target=
"_blank"
>
详情
</a>
<!-- 管理员和经理或有推送权限显示 -->
<!-- 管理员和经理或有推送权限显示 -->
@if ((in_array($role, [1, 2]) || in_array('send_salesman', $userPerms)))
@if ((in_array($role, [1, 2]) || in_array('send_salesman', $userPerms)))
...
...
resources/views/orderlist/js.blade.php
View file @
05b2beab
...
@@ -11,9 +11,9 @@
...
@@ -11,9 +11,9 @@
<script
src=
"/js/common.js"
></script>
<script
src=
"/js/common.js"
></script>
<script
src=
"/js/layui/layui.js"
></script>
<script
src=
"/js/layui/layui.js"
></script>
<script
src=
"/js/list.js?v=
<?=
time
()
?>
"
></script>
<script
src=
"/js/list.js?v=
<?=
time
()
?>
"
></script>
<script
src=
"/js/order_audit.js"
></script>
<script
src=
"/js/order_audit.js
?v=
<?=
time
()
?>
"
></script>
<script
src=
"/js/order_track.js"
></script>
<script
src=
"/js/order_track.js"
></script>
<script
src=
"/js/order_cancel.js"
></script>
<script
src=
"/js/order_cancel.js"
></script>
<script
src=
"/js/order_send_email.js"
></script>
<script
src=
"/js/order_send_email.js"
></script>
<script
src=
"/js/refund.js?v=
<?=
time
()
?>
"
></script>
resources/views/returnDetails/content.blade.php
View file @
05b2beab
...
@@ -143,8 +143,8 @@
...
@@ -143,8 +143,8 @@
</div>
</div>
</div>
</div>
<!-- 管理员、经理、自营
客服主管及助理审核
&& 待审核状态 -->
<!-- 管理员、经理、自营
查看
&& 待审核状态 -->
@if (in_array($role, [1, 2,
10, 11
])
&&
$return['status'] == 1)
@if (in_array($role, [1, 2,
5
])
&&
$return['status'] == 1)
<div
class=
"text-center"
style=
"margin-bottom: 10px;"
>
<div
class=
"text-center"
style=
"margin-bottom: 10px;"
>
<button
class=
"btn btn-info return-check"
style=
"margin-right: 10px;"
data-type=
"2"
data-id=
"{{ $return['return_id'] }}"
>
审核通过
</button>
<button
class=
"btn btn-info return-check"
style=
"margin-right: 10px;"
data-type=
"2"
data-id=
"{{ $return['return_id'] }}"
>
审核通过
</button>
<button
class=
"btn btn-danger return-check"
data-type=
"-2"
data-id=
"{{ $return['return_id'] }}"
>
驳回
</button>
<button
class=
"btn btn-danger return-check"
data-type=
"-2"
data-id=
"{{ $return['return_id'] }}"
>
驳回
</button>
...
...
resources/views/selfOrder/content.blade.php
View file @
05b2beab
...
@@ -390,7 +390,7 @@
...
@@ -390,7 +390,7 @@
@endif
@endif
@if ($v['status'] == -1
&&
!$v['cancel_reason'])
@if ($v['status'] == -1
&&
!$v['cancel_reason'])
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$v['order_id']}}"
>
填写取消原因
</a>
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$v['order_id']}}"
data-type=
"4"
>
填写取消原因
</a>
@endif
@endif
</div>
</div>
</td>
</td>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment