From fb6a00859e3a206fc1dc64250446bca2629954c2 Mon Sep 17 00:00:00 2001
From: ELF <360197197@qq.com>
Date: Mon, 23 Mar 2020 13:36:59 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BC=9A=E9=95=BF?=
=?UTF-8?q?=E6=8A=BC=E9=87=91=E9=9C=80=E6=B1=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../PresidentDepositController.class.php | 19 +-
.../Admin/View/PresidentDeposit/form.html | 6 +-
.../Admin/View/PresidentDeposit/records.html | 5 +-
.../Admin/View/PresidentDeposit/show.html | 174 ++++++++++++++++++
4 files changed, 195 insertions(+), 9 deletions(-)
create mode 100644 Application/Admin/View/PresidentDeposit/show.html
diff --git a/Application/Admin/Controller/PresidentDepositController.class.php b/Application/Admin/Controller/PresidentDepositController.class.php
index f2979972f..7c22661bc 100644
--- a/Application/Admin/Controller/PresidentDepositController.class.php
+++ b/Application/Admin/Controller/PresidentDepositController.class.php
@@ -181,7 +181,7 @@ class PresidentDepositController extends ThinkController
public function edit()
{
- $this->meta_title = '编辑/查看会长押金';
+ $this->meta_title = '编辑会长押金';
$id = I('id', 0);
$promote = M('promote', 'tab_')->field(['account', 'id'])->where(['id' => $id])->find();
$record = M('president_deposit', 'tab_')->where(['promote_id' => $id])->find();
@@ -192,6 +192,19 @@ class PresidentDepositController extends ThinkController
$this->display('form');
}
+ public function show()
+ {
+ $this->meta_title = '查看会长押金';
+ $id = I('id', 0);
+ $promote = M('promote', 'tab_')->field(['account', 'id'])->where(['id' => $id])->find();
+ $record = M('president_deposit', 'tab_')->where(['promote_id' => $id])->find();
+ $this->assign('payWays', PresidentDepositService::$payWays);
+ $this->assign('payTypes', PresidentDepositService::$payTypes);
+ $this->assign('promote', $promote);
+ $this->assign('record', $record);
+ $this->display('show');
+ }
+
public function save()
{
$payWay = I('pay_way', 0);
@@ -241,9 +254,9 @@ class PresidentDepositController extends ThinkController
return $this->success('保存成功', U('PresidentDeposit/records'));
}
- if ($record['status'] != 0) {
+ /* if ($record['status'] != 0) {
return $this->error('该状态下不可编辑/修改');
- }
+ } */
if ($amount === '') {
return $this->error('请输入金额');
diff --git a/Application/Admin/View/PresidentDeposit/form.html b/Application/Admin/View/PresidentDeposit/form.html
index b97f932d3..c4c4c3975 100644
--- a/Application/Admin/View/PresidentDeposit/form.html
+++ b/Application/Admin/View/PresidentDeposit/form.html
@@ -114,21 +114,21 @@
*金额: |
- disabled placeholder="请输入金额">
+
|
*付款人: |
- disabled placeholder="请输入付款人">
+
|
*付款账号: |
- disabled placeholder="请输入付款账号">
+
|
diff --git a/Application/Admin/View/PresidentDeposit/records.html b/Application/Admin/View/PresidentDeposit/records.html
index b3078b3ba..8fc6236d0 100644
--- a/Application/Admin/View/PresidentDeposit/records.html
+++ b/Application/Admin/View/PresidentDeposit/records.html
@@ -161,11 +161,10 @@
|
diff --git a/Application/Admin/View/PresidentDeposit/show.html b/Application/Admin/View/PresidentDeposit/show.html
new file mode 100644
index 000000000..5fb026988
--- /dev/null
+++ b/Application/Admin/View/PresidentDeposit/show.html
@@ -0,0 +1,174 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{$meta_title}
+
+
+
+
+
+
+
+
+
+
+
+
+ if(C('COLOR_STYLE')=='blue_color') echo '';
+
+
+
+
+
\ No newline at end of file
From a512fb224e73423ed59afb550fc9ae3913fd6ecc Mon Sep 17 00:00:00 2001
From: ELF <360197197@qq.com>
Date: Mon, 23 Mar 2020 13:42:47 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Admin/View/PresidentDeposit/form.html | 2 --
1 file changed, 2 deletions(-)
diff --git a/Application/Admin/View/PresidentDeposit/form.html b/Application/Admin/View/PresidentDeposit/form.html
index c4c4c3975..1a014beef 100644
--- a/Application/Admin/View/PresidentDeposit/form.html
+++ b/Application/Admin/View/PresidentDeposit/form.html
@@ -137,11 +137,9 @@
-
-
返回
From ef56ea2180bb82dd649f7f0831120cc13fbf8139 Mon Sep 17 00:00:00 2001
From: ELF <360197197@qq.com>
Date: Mon, 23 Mar 2020 14:13:17 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../PresidentDepositController.class.php | 61 +++++++++++--------
.../Admin/View/PresidentDeposit/form.html | 16 +++--
2 files changed, 46 insertions(+), 31 deletions(-)
diff --git a/Application/Admin/Controller/PresidentDepositController.class.php b/Application/Admin/Controller/PresidentDepositController.class.php
index 7c22661bc..20aaa4397 100644
--- a/Application/Admin/Controller/PresidentDepositController.class.php
+++ b/Application/Admin/Controller/PresidentDepositController.class.php
@@ -218,14 +218,18 @@ class PresidentDepositController extends ThinkController
$promoteData = M('promote', 'tab_')->field('account')->where(['id' => $promoteId])->find();
- if (!$record) {
+ if ($payType == 0) {
+ return $this->error('请选择押金付款方式');
+ }
+ if ($payType == 3) {
+ $this->handleNoDeposit($promoteId);
+ return $this->success('保存成功', U('records'));
+ }
+ if ($payType != 2 && $payWay == 0) {
+ return $this->error('请选择付款方式');
+ }
- if ($payType == 0) {
- return $this->error('请选择押金付款方式');
- }
- if ($payType != 2 && $payWay == 0) {
- return $this->error('请选择付款方式');
- }
+ if (!$record) {
if ($amount !== '') {
if (!is_numeric($amount)) {
return $this->error('请输入正确金额');
@@ -250,8 +254,7 @@ class PresidentDepositController extends ThinkController
M('president_deposit', 'tab_')->add($data);
addOperationLog(['op_type'=>0,'key'=>$promoteData['account'].'/'.$amount,'op_name'=>'新增会长押金','url'=>U('PresidentDeposit/edit',['id'=>$promoteId]),'menu'=>'推广员-结算单管理-奖罚记录管理-新增会长押金']);
-
- return $this->success('保存成功', U('PresidentDeposit/records'));
+ return $this->success('保存成功', U('records'));
}
/* if ($record['status'] != 0) {
@@ -278,6 +281,8 @@ class PresidentDepositController extends ThinkController
}
$data = [];
+ $data['pay_way'] = $payType == 2 ? 4 : $payWay;
+ $data['pay_type'] = $payType;
$data['pay_account'] = $payAccount;
$data['amount'] = floatval($amount);
$data['payer'] = $payer;
@@ -286,7 +291,7 @@ class PresidentDepositController extends ThinkController
addOperationLog(['op_type'=>1,'key'=>$promoteData['account'].'/'.$amount,'op_name'=>'编辑会长押金','url'=>U('PresidentDeposit/edit',['id'=>$promoteId]),'menu'=>'推广员-结算单管理-会长押金管理-编辑会长押金']);
- return $this->success('保存成功');
+ return $this->success('保存成功', U('records'));
}
public function delete()
@@ -302,28 +307,34 @@ class PresidentDepositController extends ThinkController
]);
}
- public function noDeposit()
+ public function handleNoDeposit($promoteId)
{
- $promoteId = I('id', 0);
$record = M('president_deposit', 'tab_')->where(['promote_id' => $promoteId])->find();
+ $data = [];
+ $data['pay_way'] = 0;
+ $data['pay_type'] = PresidentDepositService::PAY_TYPE_NONE;
+ $data['pay_account'] = '';
+ $data['amount'] = 0;
+ $data['payer'] = '';
+ $data['create_time'] = time();
+ $data['update_time'] = time();
+
if (!$record) {
- $data = [];
- $data['pay_way'] = 0;
- $data['pay_type'] = PresidentDepositService::PAY_TYPE_NONE;
$data['promote_id'] = $promoteId;
- $data['pay_account'] = '';
- $data['amount'] = 0;
- $data['payer'] = '';
- $data['create_time'] = time();
- $data['update_time'] = time();
M('president_deposit', 'tab_')->add($data);
-
- $promoteData = M('promote', 'tab_')->field('account')->where(['id' => $promoteId])->find();
-
- addOperationLog(['op_type'=>1,'key'=>$promoteData['account'],'op_name'=>'编辑无需押金','url'=>U('PresidentDeposit/records'),'menu'=>'推广员-结算单管理-会长押金管理-无需押金']);
-
+ } else {
+ M('president_deposit', 'tab_')->where(['promote_id' => $promoteId])->save($data);
}
+
+ $promoteData = M('promote', 'tab_')->field('account')->where(['id' => $promoteId])->find();
+ addOperationLog(['op_type'=>1,'key'=>$promoteData['account'],'op_name'=>'编辑无需押金','url'=>U('PresidentDeposit/records'),'menu'=>'推广员-结算单管理-会长押金管理-无需押金']);
+ }
+
+ public function noDeposit()
+ {
+ $promoteId = I('id', 0);
+ $this->handleNoDeposit($promoteId);
$this->ajaxReturn([
'status' => 1,
'message' => '操作成功'
diff --git a/Application/Admin/View/PresidentDeposit/form.html b/Application/Admin/View/PresidentDeposit/form.html
index 1a014beef..5912f2511 100644
--- a/Application/Admin/View/PresidentDeposit/form.html
+++ b/Application/Admin/View/PresidentDeposit/form.html
@@ -90,7 +90,7 @@
*押金付款方式: |
- |
-
+
style="display:none;">
*付款方式: |
- disabled>
+
$name):?>
@@ -111,21 +111,21 @@
|
-
+
style="display:none;">
*金额: |
|
-
+
style="display:none;">
*付款人: |
|
-
+
style="display:none;">
*付款账号: |
@@ -187,10 +187,14 @@ $(function(){
$('#pay_type').change(function() {
var val = $(this).val()
if (val == 2) {
+ $('.need-amount').show();
$("#pay_way option[value='4']").removeProp('disabled');
$('#pay_way').val('4').select2()
$('#pay_way').attr('disabled', 'disabled')
+ } else if(val == 3) {
+ $('.need-amount').hide();
} else {
+ $('.need-amount').show();
$('#pay_way').removeAttr('disabled');
$("#pay_way option[value='4']").prop('disabled', true);
$('#pay_way').val('').select2()
From 17f493ed7b040b192ac10fd96fc5c4f75337e8b7 Mon Sep 17 00:00:00 2001
From: ELF <360197197@qq.com>
Date: Mon, 30 Mar 2020 17:47:37 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E9=9A=90=E8=97=8F=E6=8E=A8=E5=B9=BF?=
=?UTF-8?q?=E5=91=98=E6=8C=87=E6=A0=87=E7=9B=AE=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Home/View/default/Public/promote_base.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Application/Home/View/default/Public/promote_base.html b/Application/Home/View/default/Public/promote_base.html
index 7d7666d08..a0b3062c7 100644
--- a/Application/Home/View/default/Public/promote_base.html
+++ b/Application/Home/View/default/Public/promote_base.html
@@ -72,7 +72,7 @@
充值玩家
团队/推广员业绩
- 推广员指标
+
IOS下载数统计
|