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
74ed30e1
authored
Jun 22, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整邮件抄送人
parent
81515a3b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
26 deletions
app/Http/Controllers/OrderController.php
app/Http/Controllers/PermController.php
config/config.php
resources/views/detail/detail_multi_info.php
app/Http/Controllers/OrderController.php
View file @
74ed30e1
...
@@ -2132,6 +2132,11 @@ Class OrderController extends Controller
...
@@ -2132,6 +2132,11 @@ Class OrderController extends Controller
$cc_send_mail_array
=
Config
(
'config.cc_email'
);
// 固定抄送人
$cc_send_mail_array
=
Config
(
'config.cc_email'
);
// 固定抄送人
$perm
=
new
PermController
;
$perm
=
new
PermController
;
$perm
->
getSubDepartmentId
(
33
,
$department_ids
);
// 获取线上销售部所有小组(包含自己)
$is_online
=
$perm
->
checkUserDepartment
(
$request
->
user
->
userId
,
$department_ids
);
// 检查当前客服是否属于线上销售部
$is_online
&&
$cc_send_mail_array
=
array_merge
(
$cc_send_mail_array
,
Config
(
'config.joint_online_manager'
));
// 合并联营线上主管邮箱
$kefu_manager_email
=
$perm
->
getManager
(
$request
->
user
->
userId
,
63
);
// 获取当前客服的上级主管邮箱,63-销售经理
$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
);
// 合并上级主管邮箱
$kefu_manager_email
&&
$cc_send_mail_array
=
array_merge
(
$cc_send_mail_array
,
$kefu_manager_email
);
// 合并上级主管邮箱
...
@@ -2148,6 +2153,28 @@ Class OrderController extends Controller
...
@@ -2148,6 +2153,28 @@ Class OrderController extends Controller
$cc_send_mail_array
=
array_unique
(
array_merge
(
$cc_send_mail_array
,
$cc_email_arr
));
$cc_send_mail_array
=
array_unique
(
array_merge
(
$cc_send_mail_array
,
$cc_email_arr
));
// $data['toUser'] = $request->user->email; // 收件人
// $data['ccUser'] = $cc_send_mail_array;
// $data['combined'] = $info['order_info']['order_amount'];
// $data['order_amount'] = $info['order_info']['order_amount'];
// $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);
// 同步到ERP
$url
=
Config
(
'website.api_domain'
)
.
'order/sysiteminfo'
;
$resData
[
'order_id'
]
=
$id
;
$resData
[
'k1'
]
=
time
();
$resData
[
'k2'
]
=
md5
(
md5
(
$resData
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$temp
=
json_decode
(
curlApi
(
$url
,
$resData
,
"POST"
),
true
);
// 连接API
if
(
$temp
[
'err_code'
]
!=
0
)
return
[
'errcode'
=>
$temp
[
'err_code'
],
'errmsg'
=>
$temp
[
'err_msg'
]];
// 各个采购邮件推入队列
// 各个采购邮件推入队列
foreach
(
$send_buyers
as
$k
=>
&
$v
)
{
foreach
(
$send_buyers
as
$k
=>
&
$v
)
{
$v
[
'combined'
]
=
0
;
$v
[
'combined'
]
=
0
;
...
@@ -2170,35 +2197,12 @@ Class OrderController extends Controller
...
@@ -2170,35 +2197,12 @@ Class OrderController extends Controller
$this
->
pushQueue
(
$v
);
$this
->
pushQueue
(
$v
);
}
}
// $data['toUser'] = $request->user->email; // 收件人
// 添加操作日志
// $data['ccUser'] = $cc_send_mail_array;
// $data['combined'] = $info['order_info']['order_amount'];
// $data['order_amount'] = $info['order_info']['order_amount'];
// $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
);
$event
=
'发送邮件成功,收件人邮箱:'
.
json_encode
(
$to_user_array
)
.
',抄送人邮箱:'
.
json_encode
(
$cc_send_mail_array
);
// 添加操作日志
$OrderActionLogModel
=
new
OrderActionLogModel
;
$OrderActionLogModel
=
new
OrderActionLogModel
;
$OrderActionLogModel
->
addLog
(
$id
,
$request
->
user
->
userId
,
2
,
$event
);
$OrderActionLogModel
->
addLog
(
$id
,
$request
->
user
->
userId
,
2
,
$event
);
// 同步到ERP
$url
=
Config
(
'website.api_domain'
)
.
'order/sysiteminfo'
;
$resData
[
'order_id'
]
=
$id
;
$resData
[
'k1'
]
=
time
();
$resData
[
'k2'
]
=
md5
(
md5
(
$resData
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$temp
=
json_decode
(
curlApi
(
$url
,
$resData
,
"POST"
),
true
);
// 连接API
if
(
$temp
[
'err_code'
]
!=
0
)
return
[
'errcode'
=>
$temp
[
'err_code'
],
'errmsg'
=>
$temp
[
'err_msg'
]];
return
[
'errcode'
=>
0
,
'errmsg'
=>
'推送到邮件队列成功,请稍等...'
];
return
[
'errcode'
=>
0
,
'errmsg'
=>
'推送到邮件队列成功,请稍等...'
];
}
}
...
...
app/Http/Controllers/PermController.php
View file @
74ed30e1
...
@@ -523,7 +523,13 @@
...
@@ -523,7 +523,13 @@
{
{
$map
=
[];
$map
=
[];
$map
[
'userId'
]
=
$userId
;
$map
[
'userId'
]
=
$userId
;
if
(
is_array
(
$department_id
))
{
$str
=
implode
(
','
,
$department_id
);
$map
[]
=
[
DB
::
raw
(
"department_id in (
{
$str
}
)"
),
'1'
];
}
else
{
$map
[
'department_id'
]
=
$department_id
;
$map
[
'department_id'
]
=
$department_id
;
}
return
DB
::
table
(
'user_info'
)
->
where
(
$map
)
->
select
(
'userId'
)
->
first
();
return
DB
::
table
(
'user_info'
)
->
where
(
$map
)
->
select
(
'userId'
)
->
first
();
}
}
...
...
config/config.php
View file @
74ed30e1
...
@@ -23,6 +23,13 @@ return [
...
@@ -23,6 +23,13 @@ return [
// 'zoe@ichunt.com',
// 'zoe@ichunt.com',
],
],
// 联营线上销售
'joint_online_manager'
=>
[
'ysx@ichunt.com'
,
// 'zhengjf@ichunt.com',
// 'zoe@ichunt.com',
],
// 联营采购负责人
// 联营采购负责人
'joint_purchase_manager'
=>
[
'joint_purchase_manager'
=>
[
'zty@ichunt.com'
,
'zty@ichunt.com'
,
...
...
resources/views/detail/detail_multi_info.php
View file @
74ed30e1
...
@@ -25,9 +25,9 @@
...
@@ -25,9 +25,9 @@
<tr
class=
"caption"
>
<tr
class=
"caption"
>
<th
colspan=
"8"
style=
"text-align: center; background: #f9f9f9;"
>
发票信息
<th
colspan=
"8"
style=
"text-align: center; background: #f9f9f9;"
>
发票信息
<?php
<?php
//<!-- 发票状态小于2(已发货)且更改权限存在 显示按钮 -->
//<!-- 发票状态小于2(已发货)且更改权限存在
且未同步ERP
显示按钮 -->
if
(
empty
(
$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
)
&&
empty
(
$order_temp_info
[
'erp_sn'
])
)
{
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>'
;
}
}
}
elseif
(
$order_info
[
'status'
]
!=
-
1
&&
isset
(
$tags
)
&&
$tags
==
'self'
&&
isset
(
$extend
)
&&
!
$extend
)
{
}
elseif
(
$order_info
[
'status'
]
!=
-
1
&&
isset
(
$tags
)
&&
$tags
==
'self'
&&
isset
(
$extend
)
&&
!
$extend
)
{
...
...
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