押金付款方式添加选项

master
ELF 5 years ago
parent 3ea33a7973
commit dad83c8d38

@ -205,7 +205,7 @@ class PresidentDepositController extends ThinkController
if ($payType == 0) { if ($payType == 0) {
return $this->error('请选择押金付款方式'); return $this->error('请选择押金付款方式');
} }
if ($payWay == 0) { if ($payType != 2 && $payWay == 0) {
return $this->error('请选择付款方式'); return $this->error('请选择付款方式');
} }
if ($amount !== '') { if ($amount !== '') {
@ -221,7 +221,7 @@ class PresidentDepositController extends ThinkController
} }
$data = []; $data = [];
$data['pay_way'] = $payWay; $data['pay_way'] = $payType == 2 ? 4 : $payWay;
$data['pay_type'] = $payType; $data['pay_type'] = $payType;
$data['promote_id'] = $promoteId; $data['promote_id'] = $promoteId;
$data['pay_account'] = $payAccount; $data['pay_account'] = $payAccount;

@ -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 () { $('#ratio, #begin_time, #end_time, #remark').change(function () {
var val = $(this).val(); var val = $(this).val();
var elementIdName = $(this).attr('id'); var elementIdName = $(this).attr('id');

@ -17,6 +17,7 @@ class PresidentDepositService
1 => '银行转账', 1 => '银行转账',
2 => '支付宝转账', 2 => '支付宝转账',
3 => '微信转账', 3 => '微信转账',
4 => '分成款扣除',
]; ];
public static $payTypes = [ public static $payTypes = [

@ -1347,3 +1347,7 @@ CREATE TABLE `tab_financial_summary` (
KEY `count_year` (`count_year`) USING BTREE, KEY `count_year` (`count_year`) USING BTREE,
KEY `key_name` (`key_name`) USING BTREE KEY `key_name` (`key_name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='财务分类汇总统计'; ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='财务分类汇总统计';
-- 推广员部门/小组 liaojinling
ALTER TABLE tab_promote
ADD COLUMN `group_remark` varchar(50) NOT NULL DEFAULT '' COMMENT '部门/小组';
Loading…
Cancel
Save