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
a29a6514
authored
Jun 23, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_commit_20200526'
parents
ba6a0201
55a02cd2
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
47 additions
and
29 deletions
app/Http/Controllers/OrderController.php
app/Http/Controllers/PermController.php
config/config.php
public/js/order_cancel.js
resources/views/detail/content.blade.php
resources/views/detail/detail_multi_info.php
resources/views/orderlist/content.blade.php
app/Http/Controllers/OrderController.php
View file @
a29a6514
...
@@ -2120,7 +2120,6 @@ Class OrderController extends Controller
...
@@ -2120,7 +2120,6 @@ Class OrderController extends Controller
$send_buyers
[
$value
[
'buyer_id'
]][
'data'
][]
=
$tmp
;
$send_buyers
[
$value
[
'buyer_id'
]][
'data'
][]
=
$tmp
;
$send_buyers
[
$value
[
'buyer_id'
]][
'toUser'
]
=
$value
[
'send_email'
];
$send_buyers
[
$value
[
'buyer_id'
]][
'toUser'
]
=
$value
[
'send_email'
];
$send_buyers
[
$value
[
'buyer_id'
]][
'date'
]
=
date
(
'Y-m-d'
,
time
());
$send_buyers
[
$value
[
'buyer_id'
]][
'date'
]
=
date
(
'Y-m-d'
,
time
());
$send_buyers
[
$value
[
'buyer_id'
]][
'date'
]
=
intval
(
$id
);
$send_buyers
[
$value
[
'buyer_id'
]][
'id'
]
=
$sale_name
;
$send_buyers
[
$value
[
'buyer_id'
]][
'id'
]
=
$sale_name
;
$to_user_array
[]
=
$value
[
'send_email'
];
$to_user_array
[]
=
$value
[
'send_email'
];
...
@@ -2132,6 +2131,11 @@ Class OrderController extends Controller
...
@@ -2132,6 +2131,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 +2152,28 @@ Class OrderController extends Controller
...
@@ -2148,6 +2152,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 +2196,12 @@ Class OrderController extends Controller
...
@@ -2170,35 +2196,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 @
a29a6514
...
@@ -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 @
a29a6514
...
@@ -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'
,
...
...
public/js/order_cancel.js
View file @
a29a6514
...
@@ -140,6 +140,8 @@
...
@@ -140,6 +140,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
);
...
...
resources/views/detail/content.blade.php
View file @
a29a6514
...
@@ -175,7 +175,7 @@
...
@@ -175,7 +175,7 @@
@endif
@endif
<!-- 判断邮件发送时机 -->
<!-- 判断邮件发送时机 -->
@if (!empty($order_temp_info['erp_sn']) )
@if (!empty($order_temp_info['erp_sn'])
&&
in_array($order_info['status'], [2, 3, 4])
)
<a
class=
"btn btn-primary send_mail"
data-id=
"{{ $order_info['order_id'] }}"
>
发送邮件
</a>
<a
class=
"btn btn-primary send_mail"
data-id=
"{{ $order_info['order_id'] }}"
>
发送邮件
</a>
@endif
@endif
<!-- 预付款 管理员完成首款对账后改变'对账'按钮 -->
<!-- 预付款 管理员完成首款对账后改变'对账'按钮 -->
...
...
resources/views/detail/detail_multi_info.php
View file @
a29a6514
...
@@ -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
)
{
...
...
resources/views/orderlist/content.blade.php
View file @
a29a6514
...
@@ -361,7 +361,7 @@
...
@@ -361,7 +361,7 @@
<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)
&&
in_array($v['status'], [2, 3, 4])
)
<a
class=
"btn btn-warning send_mail"
data-id=
"{{ $v['order_id'] }}"
>
发送邮件
</a>
<a
class=
"btn btn-warning send_mail"
data-id=
"{{ $v['order_id'] }}"
>
发送邮件
</a>
@endif
@endif
...
...
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