elf 1 year ago
commit 8b5c9b55f4

@ -1668,11 +1668,11 @@ function getPowerPromoteIds()
if (in_array($userAuth['data_empower_type'], [2, 3])) { if (in_array($userAuth['data_empower_type'], [2, 3])) {
$promoteIds = ''; $promoteIds = '';
//自己创建的会长 //自己创建的会长
$myPromote_ids = M('promote', 'tab_') $promotes = M('promote', 'tab_')
->field('GROUP_CONCAT(id) as promote_ids') ->field('id')
->where(['admin_id' => $userAuth['uid']]) ->where(['admin_id' => $userAuth['uid']])
->find(); ->select();
$myPromote_ids = $myPromote_ids['promote_ids']; $myPromote_ids = implode(',', array_column($promotes, 'id'));
if ($myPromote_ids) { if ($myPromote_ids) {
if ($userAuth['data_empower_type'] == 2) {//部分会长加上自己创建的会长 if ($userAuth['data_empower_type'] == 2) {//部分会长加上自己创建的会长
@ -1690,11 +1690,11 @@ function getPowerPromoteIds()
$where['id'] = array('in', $userAuth['data_president']);//会长本身 $where['id'] = array('in', $userAuth['data_president']);//会长本身
$where['_logic'] = 'or'; $where['_logic'] = 'or';
$map['_complex'] = $where; $map['_complex'] = $where;
$sqlResult = M('promote', 'tab_') $promotes = M('promote', 'tab_')
->field('GROUP_CONCAT(id) as promote_ids') ->field('id')
->where($map) ->where($map)
->find(); ->select();
$promoteIds = $sqlResult['promote_ids']; $promoteIds = implode(',', array_column($promotes, 'id'));
} }
} }
} }

@ -470,8 +470,8 @@ $(function(){
var notValue = getTodayValue() var notValue = getTodayValue()
var startValue = parseInt(startTime.replace(/-/g, "")) var startValue = parseInt(startTime.replace(/-/g, ""))
var endValue = parseInt(endTime.replace(/-/g, "")) var endValue = parseInt(endTime.replace(/-/g, ""))
if (notValue >= startValue) { if (notValue > startValue) {
return layer.msg('开始生效时间必须在今天之后') return layer.msg('开始生效时间至少从今天开始')
} }
if (endTime != '') { if (endTime != '') {
var endValue = parseInt(endTime.replace(/-/g, "")) var endValue = parseInt(endTime.replace(/-/g, ""))

Loading…
Cancel
Save