master
yulingwei 5 years ago
parent 63b99ad198
commit d33d0c3f46

@ -439,6 +439,7 @@ class GameController extends ThinkController
M('Game', 'tab_')->where($map)->data(array('relation_game_id' => $anogame['id']))->save();
}
$pic = M('Picture')->find($gda['icon']);
$count = M('Game', 'tab_')->where(array('icon' => $gda['icon']))->count();//统计icon是否为多个游戏的图标
if ($pic != '' && $count == 1) { //只有一个游戏指向这个图标
@ -761,4 +762,36 @@ class GameController extends ThinkController
}
public function companyGames($id)
{
$games = M('Game', 'tab_')
->where(['partner_id'=>$id])
->join("tab_cp_game_ratio on tab_game.id = tab_cp_game_ratio.game_id and begin_total_amount = 0 and is_del = 0", "left")
->field("relation_game_name, game_id, tab_cp_game_ratio.ratio")
->group('relation_game_id')->select();
echo M()->getLastSql();
var_dump($games);
}
public function devide_warn_list()
{
}
public function devide_warn_edit($id=0)
{
if (IS_POST) {
} else {
$partners = M('partner', 'tab_')->field("id, partner")->where(['status'=>1])->order('last_up_time desc')->select();
$this->assign('partners', $partners);
if ($id) {
$warnInfo = M('partner_divide_warn', 'tab_')->where(['id'=>$id])->find();
if (!$warnInfo) return $this->error('未找到该记录');
$this->assign('warnInfo', $warnInfo);
}
$this->display();
}
}
}

@ -0,0 +1,55 @@
<extend name="Public/base" />
<!-- 管理员用户组新增和编辑页面 -->
<block name="body">
<form action="{:U('Member/save_device_bans')}" enctype="application/x-www-form-urlencoded" method="POST"
class="form-horizontal form_info_ml">
<div class="formtitle"><span>预警编辑</span></div>
<ul class="form_info ">
<input type="hidden" name="id" value="{$auth_group.id}" />
<li>
<label>预警对象</label>
<select id="type" name="type" class="select_gallery">
<?php foreach ($partners as $p):?>
<option value="{$p['id']}" >{$p.partner}</option>
<?php endforeach;?>
</select>
</li>
<li>
<label>预付金额</label>
<input name="advance_amount" type="text" class="txt" placeholder="预付金额" value="{$warnInfo.advance_amount}" />
</li>
<li>
<label>预警金额</label>
<input name="warming_amount" type="text" class="txt" placeholder="预警金额" value="{$warnInfo.warming_amount}" />
</li>
<li>
<label>通知手机号</label>
<td class="r">
<input type="text" class="txt table_text_input" name="game_amount" value="10000.00" placeholder="" style="width: 55px"><span class="form_unit" style="margin: 0 10px">分成比例</span>
<input type="text" class="txt table_text_input" name="game_ratio" value="10.00" placeholder="" style="width: 50px"><span class="form_unit">%</span>
<button type="button" class="bnt_add"></button>
<button type="button" class="bnt_remove" data-id="24"></button>
<button type="button" class="bnt_save" data-id="24" data-type="ladder" style="display: none"></button>
</td>
</li>
<li>
<label>&nbsp;</label><input type="submit" id="submit" value="确认保存" target-form="form-horizontal" class="form_btn ajax-post">
</li>
</ul>
</form>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$m_title}">
<input type="hidden" name="url" value="AuthManager/index">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
</block>
<block name="script">
<script type="text/javascript">
highlight_subnav('{:U('Game/devide_warn_edit')}');
</script>
</block>
Loading…
Cancel
Save