|
@@ -590,41 +590,47 @@ class Order
|
|
|
$soft_price = $role['soft'];
|
|
|
}
|
|
|
|
|
|
- $purl = Dever::url('project/database/update?project=agent&table=order&where_id='.$info['id'].'&col=admin_desc', 'manage');
|
|
|
- $button[] = array
|
|
|
- (
|
|
|
- 'type' => 'edit',
|
|
|
- 'link' => $purl,
|
|
|
- 'name' => '备注',
|
|
|
- );
|
|
|
-
|
|
|
- if ($info['status'] <= 1) {
|
|
|
- $purl = Dever::url('project/database/update?project=agent&table=order&where_id='.$info['id'].'&col=invite_type,parent_code,source_id,name,idcard,type,idcard_front,idcard_back,company_name,company_number,company_pic,pay_type,pay_pic', 'manage');
|
|
|
-
|
|
|
+ if (Dever::load('manage/auth')->checkFunc('agent.order', 'edit', '备注')) {
|
|
|
+ $purl = Dever::url('project/database/update?project=agent&table=order&where_id='.$info['id'].'&col=admin_desc', 'manage');
|
|
|
$button[] = array
|
|
|
(
|
|
|
'type' => 'edit',
|
|
|
'link' => $purl,
|
|
|
- 'name' => '修改资料',
|
|
|
+ 'name' => '备注',
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- if ($info['status'] <= 3 && $info['status'] > 0) {
|
|
|
-
|
|
|
- $button[] = array
|
|
|
- (
|
|
|
- 'type' => 'action',
|
|
|
- 'link' => Dever::url('lib/manage.setOrderStatus?id=' . $info['id'] . '&value=6', 'agent'),
|
|
|
- 'name' => '挂起',
|
|
|
- );
|
|
|
- } elseif ($info['status'] == 6) {
|
|
|
-
|
|
|
- $button[] = array
|
|
|
- (
|
|
|
- 'type' => 'action',
|
|
|
- 'link' => Dever::url('lib/manage.setOrderStatus?id=' . $info['id'] . '&value=' . $info['history_status'], 'agent'),
|
|
|
- 'name' => '恢复',
|
|
|
- );
|
|
|
+ if (Dever::load('manage/auth')->checkFunc('agent.order', 'edit1', '修改资料')) {
|
|
|
+ if ($info['status'] <= 1) {
|
|
|
+ $purl = Dever::url('project/database/update?project=agent&table=order&where_id='.$info['id'].'&col=invite_type,parent_code,source_id,name,idcard,type,idcard_front,idcard_back,company_name,company_number,company_pic,pay_type,pay_pic', 'manage');
|
|
|
+
|
|
|
+ $button[] = array
|
|
|
+ (
|
|
|
+ 'type' => 'edit',
|
|
|
+ 'link' => $purl,
|
|
|
+ 'name' => '修改资料',
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (Dever::load('manage/auth')->checkFunc('agent.order', 'edit2', '挂起')) {
|
|
|
+ if ($info['status'] <= 3 && $info['status'] > 0) {
|
|
|
+
|
|
|
+ $button[] = array
|
|
|
+ (
|
|
|
+ 'type' => 'action',
|
|
|
+ 'link' => Dever::url('lib/manage.setOrderStatus?id=' . $info['id'] . '&value=6', 'agent'),
|
|
|
+ 'name' => '挂起',
|
|
|
+ );
|
|
|
+ } elseif ($info['status'] == 6) {
|
|
|
+
|
|
|
+ $button[] = array
|
|
|
+ (
|
|
|
+ 'type' => 'action',
|
|
|
+ 'link' => Dever::url('lib/manage.setOrderStatus?id=' . $info['id'] . '&value=' . $info['history_status'], 'agent'),
|
|
|
+ 'name' => '恢复',
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if ($info['status'] == 1) {
|
|
@@ -642,30 +648,32 @@ class Order
|
|
|
$purl .= '&where_id=' . $process[1]['id'];
|
|
|
}
|
|
|
|
|
|
- if ($parent_member) {
|
|
|
- if ($parent_member['status'] == 2) {
|
|
|
+ if (Dever::load('manage/auth')->checkFunc('agent.order', 'edit3', '业务初审')) {
|
|
|
+ if ($parent_member) {
|
|
|
+ if ($parent_member['status'] == 2) {
|
|
|
+ $button[] = array
|
|
|
+ (
|
|
|
+ 'type' => 'edit',
|
|
|
+ 'link' => $purl,
|
|
|
+ 'name' => '业务初审',
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ $button[] = array
|
|
|
+ (
|
|
|
+ 'type' => 'click',
|
|
|
+ 'content' => 'showCs()',
|
|
|
+ 'name' => '业务初审<script>function showCs(){layer.msg("直属上级未认证,无法进行初审")}</script>'
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
$button[] = array
|
|
|
(
|
|
|
'type' => 'edit',
|
|
|
'link' => $purl,
|
|
|
'name' => '业务初审',
|
|
|
);
|
|
|
- } else {
|
|
|
- $button[] = array
|
|
|
- (
|
|
|
- 'type' => 'click',
|
|
|
- 'content' => 'showCs()',
|
|
|
- 'name' => '业务初审<script>function showCs(){layer.msg("直属上级未认证,无法进行初审")}</script>'
|
|
|
- );
|
|
|
}
|
|
|
-
|
|
|
- } else {
|
|
|
- $button[] = array
|
|
|
- (
|
|
|
- 'type' => 'edit',
|
|
|
- 'link' => $purl,
|
|
|
- 'name' => '业务初审',
|
|
|
- );
|
|
|
}
|
|
|
|
|
|
} elseif ($info['status'] == 2) {
|
|
@@ -674,24 +682,28 @@ class Order
|
|
|
if (isset($process[2]) && $process[2]) {
|
|
|
$purl .= '&where_id=' . $process[2]['id'];
|
|
|
}
|
|
|
- $button[] = array
|
|
|
- (
|
|
|
- 'type' => 'edit',
|
|
|
- 'link' => $purl,
|
|
|
- 'name' => '财务终审',
|
|
|
- );
|
|
|
+ if (Dever::load('manage/auth')->checkFunc('agent.order', 'edit4', '财务终审')) {
|
|
|
+ $button[] = array
|
|
|
+ (
|
|
|
+ 'type' => 'edit',
|
|
|
+ 'link' => $purl,
|
|
|
+ 'name' => '财务终审',
|
|
|
+ );
|
|
|
+ }
|
|
|
|
|
|
} elseif ($info['status'] == 3) {
|
|
|
$purl = Dever::url('project/database/update?project=agent&table=order_process&order_id='.$info['id'].'&status=3&col=order_id,status,type', 'manage');
|
|
|
if (isset($process[3]) && $process[3]) {
|
|
|
$purl .= '&where_id=' . $process[3]['id'];
|
|
|
}
|
|
|
- $button[] = array
|
|
|
- (
|
|
|
- 'type' => 'edit',
|
|
|
- 'link' => $purl,
|
|
|
- 'name' => '确认完成',
|
|
|
- );
|
|
|
+ if (Dever::load('manage/auth')->checkFunc('agent.order', 'edit5', '确认完成')) {
|
|
|
+ $button[] = array
|
|
|
+ (
|
|
|
+ 'type' => 'edit',
|
|
|
+ 'link' => $purl,
|
|
|
+ 'name' => '确认完成',
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
$button[] = array
|
|
@@ -955,16 +967,20 @@ class Order
|
|
|
$process_status = 2;
|
|
|
$process_title = '(未发放权益)';
|
|
|
|
|
|
- $process_button[] = array(
|
|
|
- 'type' => 'link',
|
|
|
- 'link' => Dever::url('lib/order_set.home?order_id='.$info['id'].'&role_id=' . $info['role'] . '&total=' . $t, 'agent'),
|
|
|
- 'name' => '修改权益'
|
|
|
- );
|
|
|
- $process_button[] = array(
|
|
|
- 'type' => 'action',
|
|
|
- 'link' => Dever::url('lib/manage.set_commit?json=1&type=2&order_id='.$info['id'], 'agent'),
|
|
|
- 'name' => '确认发放权益'
|
|
|
- );
|
|
|
+ if (Dever::load('manage/auth')->checkFunc('agent.order', 'edit6', '修改权益')) {
|
|
|
+ $process_button[] = array(
|
|
|
+ 'type' => 'link',
|
|
|
+ 'link' => Dever::url('lib/order_set.home?order_id='.$info['id'].'&role_id=' . $info['role'] . '&total=' . $t, 'agent'),
|
|
|
+ 'name' => '修改权益'
|
|
|
+ );
|
|
|
+ }
|
|
|
+ if (Dever::load('manage/auth')->checkFunc('agent.order', 'edit7', '确认发放权益')) {
|
|
|
+ $process_button[] = array(
|
|
|
+ 'type' => 'action',
|
|
|
+ 'link' => Dever::url('lib/manage.set_commit?json=1&type=2&order_id='.$info['id'], 'agent'),
|
|
|
+ 'name' => '确认发放权益'
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if ($goods) {
|
|
@@ -1028,11 +1044,13 @@ class Order
|
|
|
} else {
|
|
|
$agreement_title = '(未生成合同)';
|
|
|
|
|
|
- $agreement_button[] = array(
|
|
|
- 'type' => 'action',
|
|
|
- 'link' => Dever::url('lib/manage.set_commit?json=1&type=5&order_id='.$info['id'], 'agent'),
|
|
|
- 'name' => '生成代理合同'
|
|
|
- );
|
|
|
+ if (Dever::load('manage/auth')->checkFunc('agent.order', 'edit8', '生成代理合同')) {
|
|
|
+ $agreement_button[] = array(
|
|
|
+ 'type' => 'action',
|
|
|
+ 'link' => Dever::url('lib/manage.set_commit?json=1&type=5&order_id='.$info['id'], 'agent'),
|
|
|
+ 'name' => '生成代理合同'
|
|
|
+ );
|
|
|
+ }
|
|
|
|
|
|
$agreement = Dever::db('setting/agreement')->getData();
|
|
|
$agreement_status_name = $agreement_status[1];
|