123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- <{include file="admin/header.html"}><{include file="admin/nav.html"}>
- <div class="container">
-
- <form id="myform" method="post" action="<{$web_cfg.domain}>?c=admin_Lottery&a=UpPrize" enctype="multipart/form-data" >
- <table class="table">
- <input type="hidden" name="events_id" value="<{$event_data.id}>">
- <input type="hidden" name="prize_id" value="<{$prize_data.id}>">
- <tr>
- <td>活动名称:</td>
- <td><{$event_data.events_name}></td>
- </tr>
- <tr>
- <td>奖项名称:</td>
- <td><input type="text" name="prize_name" value="<{$prize_data.prize_name}>"></td>
- </tr>
- <tr>
- <td>图片:</td>
- <td>
- <{if $prize_data.img_url}>
- <img src="<{$prize_data.img_url}>"></img>
- <{/if}>
- <input type="hidden" name='old_img_url' value="<{$prize_data.img_url}>" >
- <input type="file" accept="image/jpeg,image/png,image/bmp" name="image" multiple="multiple">
- </td>
- </tr>
- <tr>
- <td>发奖时间段:</td>
- <td>
- <input type="text" value="<{$prize_data.begin_hour}>" name="begin_hour" id="begin_hour" size="3px"/> -
- <input type="text" value="<{$prize_data.end_hour}>" name="end_hour" id="end_hour" size="3px"/>
- </td>
- </tr>
- <tr>
- <td>属性:</td>
- <td>
- <{$prizeType[$prize_data.type].desc}>
- </td>
- </tr>
- <tr>
- <td>是否需要快递:</td>
- <td>
- <select name="express" id="express">
- <{foreach from=$prizeExpress key=index item=express}>
- <option value="<{$index}>" <{if $prize_data.express==$index}>selected="selected"<{/if}> ><{$express.desc}></option>
- <{/foreach}>
- </select>
- </td>
- </tr>
- <tr>
- <td>白名单:</td>
- <td><textarea name="white_list" rows="5" cols="47" ><{$prize_data.white_list}></textarea></td>
- </tr>
-
- <tr>
- <td>黑名单:</td>
- <td><textarea name="black_list" rows="5" cols="47" ><{$prize_data.black_list}></textarea></td>
- </tr>
- <tr>
- <td>状态:</td>
- <td>
- <{foreach from=$prizeDisplayStatus key=index item=display}>
- <{$display.desc}>:<input name="display" type="radio" value="<{$index}>" <{if $index== $prize_data.display}> checked <{/if}> />
- <{/foreach}>
- </td>
- </tr>
- </table>
-
-
- <a href="javascript:;" class="btn btn-primary" id="ti_sut" style="padding:1px;">修改奖项</a>
- </form>
- </div>
- <br>
- <script type="text/javascript">
- KISSY.use("node, io, json,jquery", function(S, Node, IO, JSON, jQuery){
-
- $('#ti_sut').click(function(){
- var prize_name=$("#prize_name").val();
- var typeValue=$("#type").val();
- var prize_num = $('#prize_num').val();
- var virtual_data = $('#virtual_data').val();
- var begin_hour = $('#begin_hour').val();
- var end_hour = $('#end_hour').val();
-
- if(typeValue=='' || prize_name=='' || begin_hour == '' || end_hour == '' || typeValue==-1){
- alert('请填写完整的参数');
- return ;
- }
-
- if(begin_hour*1 >= end_hour*1){
- alert('发奖时间段填写错误');
- return ;
- }
-
- if(typeValue==1 && prize_num==''){
- alert('请填写奖项数量');
- return ;
- }
- if(typeValue==2 && virtual_data==''){
- alert('请填写虚拟数据');
- return ;
- }
-
- $("#myform").submit();
- });
-
-
- // 获取类型 动态显示(虚拟 & 实物)
- $('#prize_num').val('');
- $('#virtual_data').val('');
- var typeValue=$("#type").val();
- if(typeValue == -1){
- $('#prize_num_tr').hide();
- $('#virtual_data_tr').hide();
- }
- if(typeValue == 1){
- $('#prize_num_tr').show();
- $('#virtual_data_tr').hide();
- }
- if(typeValue == 2){
- $('#prize_num_tr').hide();
- $('#virtual_data_tr').show();
- }
-
- // 当下拉选框发生变化的时候
- $("#type").change(function(){
- $('#prize_num').val('');
- $('#virtual_data').val('');
-
- var ck_value = $(this).val();
- if(ck_value == -1){
- $('#prize_num_tr').hide();
- $('#virtual_data_tr').hide();
- }
- if(ck_value == 1){
- $('#prize_num_tr').show();
- $('#virtual_data_tr').hide();
- }
- if(ck_value == 2){
- $('#prize_num_tr').hide();
- $('#virtual_data_tr').show();
- }
- });
-
-
-
-
- });
- </script>
- <{include file="admin/bottom.html"}>
|