diff --git a/Application/Admin/Controller/PresidentDepositController.class.php b/Application/Admin/Controller/PresidentDepositController.class.php index bfb56c637..396b32df6 100644 --- a/Application/Admin/Controller/PresidentDepositController.class.php +++ b/Application/Admin/Controller/PresidentDepositController.class.php @@ -205,7 +205,7 @@ class PresidentDepositController extends ThinkController if ($payType == 0) { return $this->error('请选择押金付款方式'); } - if ($payWay == 0) { + if ($payType != 2 && $payWay == 0) { return $this->error('请选择付款方式'); } if ($amount !== '') { @@ -221,7 +221,7 @@ class PresidentDepositController extends ThinkController } $data = []; - $data['pay_way'] = $payWay; + $data['pay_way'] = $payType == 2 ? 4 : $payWay; $data['pay_type'] = $payType; $data['promote_id'] = $promoteId; $data['pay_account'] = $payAccount; diff --git a/Application/Admin/View/PresidentDeposit/form.html b/Application/Admin/View/PresidentDeposit/form.html index 80a517f1d..04ea3d80a 100644 --- a/Application/Admin/View/PresidentDeposit/form.html +++ b/Application/Admin/View/PresidentDeposit/form.html @@ -216,6 +216,18 @@ $(function(){ }); }); + $('#pay_type').change(function() { + var val = $(this).val() + if (val == 2) { + $("#pay_way option[value='4']").removeProp('disabled'); + $('#pay_way').val('4').select2() + $('#pay_way').attr('disabled', 'disabled') + } else { + $('#pay_way').removeAttr('disabled'); + $("#pay_way option[value='4']").prop('disabled', true); + $('#pay_way').val('').select2() + } + }) $('#ratio, #begin_time, #end_time, #remark').change(function () { var val = $(this).val(); var elementIdName = $(this).attr('id'); diff --git a/Application/Base/Service/PresidentDepositService.class.php b/Application/Base/Service/PresidentDepositService.class.php index 8d6299baa..2dcd8db0c 100644 --- a/Application/Base/Service/PresidentDepositService.class.php +++ b/Application/Base/Service/PresidentDepositService.class.php @@ -17,6 +17,7 @@ class PresidentDepositService 1 => '银行转账', 2 => '支付宝转账', 3 => '微信转账', + 4 => '分成款扣除', ]; public static $payTypes = [ diff --git a/Data/update.sql b/Data/update.sql index 2998e4fa1..7b3859fe9 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -1347,3 +1347,7 @@ CREATE TABLE `tab_financial_summary` ( KEY `count_year` (`count_year`) USING BTREE, KEY `key_name` (`key_name`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='财务分类汇总统计'; + +-- 推广员部门/小组 liaojinling +ALTER TABLE tab_promote +ADD COLUMN `group_remark` varchar(50) NOT NULL DEFAULT '' COMMENT '部门/小组'; \ No newline at end of file