why.xingtongworld.com项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

696 lines
34 KiB

{extend name="admin@public/base" /}
{block name="main-content"}
<div class="page-content">
<!--主题-->
<div class="page-header">
<h1>
您当前操作
<small>
<i class="ace-icon fa fa-angle-double-right"></i>
修改
</small>
</h1>
</div>
<div class="row">
<div class="col-xs-12">
<form class="form-horizontal ajaxForm2" name="form0" method="post" action="{:url('admin/Bigdata/show_edit',array('kind'=>$c_kind,'page'=>$page))}" enctype="multipart/form-data">
<input type="hidden" name="c_id" value="{$list.c_id}" />
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right" >产品类型: </label>
<div class="col-sm-10" style="padding-top:8px;">
<input type="radio" name="c_kind" id="kind1" value="1" {if condition="$list['c_kind'] eq 1"}checked{/if}> 打码 &nbsp;&nbsp;
<input type="radio" name="c_kind" id="kind2" value="2" {if condition="$list['c_kind'] eq 2"}checked{/if}> 不打码&nbsp;&nbsp;
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right" >热门标的: </label>
<div class="col-sm-10" style="padding-top:8px;">
<input type="radio" name="c_hot" id="hot1" value="1" {if condition="$list['c_hot'] eq 1"}checked{/if}>&nbsp;&nbsp;
<input type="radio" name="c_hot" id="hot2" value="0" {if condition="$list['c_hot'] neq 1"}checked{/if}>&nbsp;&nbsp;
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right"> 是否摘牌: </label>
<div class="col-sm-10" style="padding-top:5px;">
<input name='c_tag' {if condition="$list['c_tag'] eq 1"}checked{/if} value='1' class='ace ace-switch ace-switch-4 btn-flat' type='checkbox' />
<span class="lbl">&nbsp;&nbsp;默认未摘</span>
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right" ><h3 style="margin:0px">标的信息</h3></label>
<div class="col-sm-11" style="padding-top:8px;"></div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right">标的名称: </label>
<div class="col-sm-10">
<input type="text" name="c_name" placeholder="必填" class="col-xs-10 col-sm-6" value="{$list.c_name}" required/>
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right">标的编码: </label>
<div class="col-sm-10">
<input type="text" name="c_code" class="col-xs-10 col-sm-6" value="{$list.c_code}" readonly/>
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right">标的ISLI标志码: </label>
<div class="col-sm-10">
<input type="text" name="c_icode" placeholder="选填" value="{$list.c_icode}" class="col-xs-10 col-sm-6" />
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right" >标的类型: </label>
<div class="col-sm-10" style="padding-top:8px;">
<input type="radio" name="c_type" id="type1" value="1" {if condition="$list['c_type'] eq 1"}checked{/if}> 文化资源数据 &nbsp;&nbsp;
<input type="radio" name="c_type" id="type2" value="2" {if condition="$list['c_type'] eq 2"}checked{/if}> 文化数字内容 &nbsp;&nbsp;
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right" >交易方式: </label>
<div class="col-sm-10" style="padding-top:8px;">
<input type="radio" name="c_pay" id="pay1" value="1" {if condition="$list['c_pay'] eq 1"}checked{/if}> 授权 &nbsp;&nbsp;
<input type="radio" name="c_pay" id="pay2" value="2" {if condition="$list['c_pay'] eq 2"}checked{/if}> 转让 &nbsp;&nbsp;
</div>
</div>
<div class="space-4"></div>
<div class="form-group" id="cptype">
<label class="col-sm-2 control-label no-padding-right" >授权方式: </label>
<div class="col-sm-10" style="padding-top:8px;">
<input type="radio" name="c_ptype" id="cpay1" value="1" {if condition="$list['c_ptype'] eq 1"}checked{/if}> 普通授权 &nbsp;&nbsp;
<input type="radio" name="c_ptype" id="cpay2" value="2" {if condition="$list['c_ptype'] eq 2"}checked{/if}> 独占授权 &nbsp;&nbsp;
<input type="radio" name="c_ptype" id="cpay2" value="3" {if condition="$list['c_ptype'] eq 3"}checked{/if}> 排他授权 &nbsp;&nbsp;
</div>
</div>
<div class="space-4"></div>
<div class="form-group" id="cpscope">
<label class="col-sm-2 control-label no-padding-right" >授权领域: </label>
<div class="col-sm-10">
<input type="text" name="c_pscope" class="col-xs-10 col-sm-6" value="{$list.c_pscope}" />
</div>
</div>
<div class="space-4"></div>
<div class="form-group ckind1">
<label class="col-sm-2 control-label no-padding-right" >权属来源: </label>
<div class="col-sm-10" style="padding-top:8px;">
<input type="radio" name="c_source" id="source1" value="1" {if condition="$list['c_source'] eq 1"}checked{/if}> 自创&nbsp;&nbsp;
<input type="radio" name="c_source" id="source2" value="2" {if condition="$list['c_source'] eq 2"}checked{/if}> 受让&nbsp;&nbsp;
<input type="radio" name="c_source" id="source3" value="3" {if condition="$list['c_source'] eq 3"}checked{/if}> 被授权 &nbsp;&nbsp;
</div>
</div>
<div class="space-4"></div>
<div class="form-group ckind1">
<label class="col-sm-2 control-label no-padding-right" > 权属方: </label>
<div class="col-sm-10">
<input type="text" name="c_ower" class="col-xs-10 col-sm-6" value="{$list.c_ower}" />
</div>
</div>
<div class="space-4"></div>
<div class="form-group ckind1">
<label class="col-sm-2 control-label no-padding-right" >权利类型: </label>
<div class="col-sm-10" style="padding-top:8px;">
<input type="checkbox" name="allbtn" id="allbtn" >&nbsp;全部&nbsp;
<input type="checkbox" name="c_right[]" id="right1" value="1" {if condition="in_array(1,explode(',',$list['c_right']))"}checked{/if}>&nbsp;复制权&nbsp;
<input type="checkbox" name="c_right[]" id="right2" value="2" {if condition="in_array(2,explode(',',$list['c_right']))"}checked{/if}>&nbsp;发行权&nbsp;&nbsp;
<input type="checkbox" name="c_right[]" id="right3" value="3" {if condition="in_array(3,explode(',',$list['c_right']))"}checked{/if}>&nbsp;出租权 &nbsp;&nbsp;
<input type="checkbox" name="c_right[]" id="right4" value="4" {if condition="in_array(4,explode(',',$list['c_right']))"}checked{/if}>&nbsp;展览权&nbsp;&nbsp;
<input type="checkbox" name="c_right[]" id="right5" value="5" {if condition="in_array(5,explode(',',$list['c_right']))"}checked{/if}>&nbsp;改编权&nbsp;&nbsp;
<input type="checkbox" name="c_right[]" id="right6" value="6" {if condition="in_array(6,explode(',',$list['c_right']))"}checked{/if}>&nbsp;表演权&nbsp;&nbsp;
<input type="checkbox" name="c_right[]" id="right7" value="7" {if condition="in_array(7,explode(',',$list['c_right']))"}checked{/if}>&nbsp;放映权&nbsp;&nbsp;
<input type="checkbox" name="c_right[]" id="right8" value="8" {if condition="in_array(8,explode(',',$list['c_right']))"}checked{/if}>&nbsp;广播权&nbsp;&nbsp;
<input type="checkbox" name="c_right[]" id="right9" value="9" {if condition="in_array(9,explode(',',$list['c_right']))"}checked{/if}>&nbsp;摄制权 &nbsp;&nbsp;
<input type="checkbox" name="c_right[]" id="right7" value="10" {if condition="in_array(10,explode(',',$list['c_right']))"}checked{/if}>&nbsp;翻译权&nbsp;&nbsp;
<input type="checkbox" name="c_right[]" id="right8" value="11" {if condition="in_array(11,explode(',',$list['c_right']))"}checked{/if}>&nbsp;汇编权&nbsp;&nbsp;
<input type="checkbox" name="c_right[]" id="right9" value="12" {if condition="in_array(12,explode(',',$list['c_right']))"}checked{/if}>&nbsp;信息网络传播权 &nbsp;&nbsp;
</div>
</div>
<div class="space-4"></div>
<div class="form-group ckind1">
<label class="col-sm-2 control-label no-padding-right">资源数量: </label>
<div class="col-sm-10">
<input type="text" name="c_num" class="col-xs-10 col-sm-6" value="{$list.c_num}" />
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right" >资源类别: </label>
<div class="col-sm-3" style="padding-top:8px;">
<input type="radio" name="c_cate" id="cate1" value="1" {if condition="$list['c_cate'] eq 1"}checked{/if}> 图片 &nbsp;&nbsp;
<input type="radio" name="c_cate" id="cate2" value="2" {if condition="$list['c_cate'] eq 2"}checked{/if}> 音频&nbsp;&nbsp;
<input type="radio" name="c_cate" id="cate3" value="3" {if condition="$list['c_cate'] eq 3"}checked{/if}> 视频&nbsp;&nbsp;
<input type="radio" name="c_cate" id="cate4" value="4" {if condition="$list['c_cate'] eq 4"}checked{/if}> 电子文档 &nbsp;&nbsp;
<input type="radio" name="c_cate" id="cate5" value="5" {if condition="$list['c_cate'] eq 5"}checked{/if}> 三维全景&nbsp;&nbsp;
<input type="radio" name="c_cate" id="cate6" value="6" {if condition="$list['c_cate'] eq 6"}checked{/if}> 其他 &nbsp;&nbsp;
</div>
<div class="col-sm-4">
<input type="text" name="c_cother" class="col-sm-6" value="{$list.c_cother}" placeholder="其他内容" style="padding:3px 4px 3px"/>
</div>
</div>
<div class="space-4"></div>
<div class="form-group ckind1">
<label class="col-sm-2 control-label no-padding-right" >可应用场景: </label>
<div class="col-sm-5" style="padding-top:8px;">
<input type="checkbox" name="c_scene[]" id="cscene1" value="1" {if condition="in_array(1,explode(',',$list['c_scene']))"}checked{/if}> 软件开发 &nbsp;&nbsp;
<input type="checkbox" name="c_scene[]" id="cscene2" value="2" {if condition="in_array(2,explode(',',$list['c_scene']))"}checked{/if}> 文化数字内容服务&nbsp;&nbsp;
<input type="checkbox" name="c_scene[]" id="cscene3" value="3" {if condition="in_array(3,explode(',',$list['c_scene']))"}checked{/if}> 互联网生活服务平台&nbsp;&nbsp;
<input type="checkbox" name="c_scene[]" id="cscene4" value="4" {if condition="in_array(4,explode(',',$list['c_scene']))"}checked{/if}> 可穿戴智能设备制造&nbsp;&nbsp;
<input type="checkbox" name="c_scene[]" id="cscene5" value="5" {if condition="in_array(5,explode(',',$list['c_scene']))"}checked{/if}> 广播影视节目制作&nbsp;&nbsp;
<input type="checkbox" name="c_scene[]" id="cscene6" value="6" {if condition="in_array(6,explode(',',$list['c_scene']))"}checked{/if}> 文化娱乐休闲服务&nbsp;&nbsp;
<input type="checkbox" name="c_scene[]" id="cscene7" value="7" {if condition="in_array(7,explode(',',$list['c_scene']))"}checked{/if}> 玩具制造&nbsp;&nbsp;
<input type="checkbox" name="c_scene[]" id="cscene8" value="8" {if condition="in_array(8,explode(',',$list['c_scene']))"}checked{/if}> 动漫游戏&nbsp;&nbsp;
<input type="checkbox" name="c_scene[]" id="cscene9" value="9" {if condition="in_array(9,explode(',',$list['c_scene']))"}checked{/if}> 教育&nbsp;&nbsp;
<input type="checkbox" name="c_scene[]" id="cscene10" value="10" {if condition="in_array(10,explode(',',$list['c_scene']))"}checked{/if}> 服装&nbsp;&nbsp;
<input type="checkbox" name="c_scene[]" id="cscene11" value="11" {if condition="in_array(11,explode(',',$list['c_scene']))"}checked{/if}> 其他 &nbsp;&nbsp;
</div>
<div class="col-sm-2">
<input type="text" name="c_sother" value="{$list.c_sother}" class="col-sm-6" placeholder="其他可应用场景" style="padding:3px 4px 3px"/>
</div>
</div>
<div class="space-4"></div>
<div class="form-group ckind1">
<label class="col-sm-2 control-label no-padding-right" >委托类型: </label>
<div class="col-sm-10" style="padding-top:8px;">
<input type="radio" name="c_proxy" id="proxy2" value="1" {if condition="$list['c_proxy'] eq 1"}checked{/if}>永久性委托&nbsp;&nbsp;
<input type="radio" name="c_proxy" id="proxy3" value="2" {if condition="$list['c_proxy'] eq 2"}checked{/if}> 阶段性委托 &nbsp;&nbsp;
</div>
</div>
<div class="space-4"></div>
<div class="form-group ckind1">
<label class="col-sm-2 control-label no-padding-right" >收费类型: </label>
<div class="col-sm-10" style="padding-top:8px;">
<input type="radio" name="c_charge" id="charge1" value="1" {if condition="$list['c_charge'] eq 1"}checked{/if}> 付费 &nbsp;&nbsp;
<input type="radio" name="c_charge" id="charge2" value="2" {if condition="$list['c_charge'] eq 2"}checked{/if}>免费&nbsp;&nbsp;
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right">报价: </label>
<div class="col-sm-10">
<input type="text" name="c_price" class="col-xs-10 col-sm-6" value="{$list.c_price|default='可议价'}" required/>
</div>
</div>
<div class="space-4"></div>
<div class="form-group ckind1">
<label class="col-sm-2 control-label no-padding-right">授权年限(年): </label>
<div class="col-sm-10">
<input type="number" name="c_year" id="c_year" class="col-xs-10 col-sm-6" value="{$list.c_year}" />
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right" > 委托日期: </label>
<div class="col-sm-10">
<input name="c_gptime" class="date-picker col-xs-10 col-sm-6" required autocomplete="off" value="{$list['c_gptime']|date='Y-m-d',###}" type="text" data-date-format="yyyy-mm-dd">
<span class="lbl"></span>
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right" > 产品上传: </label>
<div class="col-sm-10">
<input type="hidden" name="checkpic" id="checkpic" value="{$list.c_logo}" />
<input type="hidden" name="oldcheckpic" id="oldcheckpic" value="{$list.c_logo}" />
<a href="javascript:;" class="file" title="点击选择所要上传的图片">
<input type="file" name="pic_one[]" id="file0" multiple="multiple"/>
选择上传文件
</a>
<span class="lbl">&nbsp;&nbsp;<img src="{$list.c_logo?SITE_PATH.get_imgurl($list['c_logo']):''}" height="70" id="img0" ></span>&nbsp;&nbsp;<a href="javascript:;" onclick="return backpic('{$list.c_logo|get_imgurl}');" title="还原修改前的图片" class="file">
撤销修改
</a>
<span class="lbl">&nbsp;&nbsp;上传前先用PS处理成等比例图片后上传,最后都统一比例<br />
</span>
</div>
</div>
<div class="space-4"></div>
<div class="form-group ckind2">
<label class="col-sm-2 control-label no-padding-right" > 详情跳转连接: </label>
<div class="col-sm-10">
<input name="c_url" class=" col-xs-10 col-sm-6" value="{$list.c_url}" type="text" >
<span class="lbl">&nbsp;&nbsp;<button class="btn" id="urlbtn" style="padding:2px 12px;">测试按钮</button></span>
</div>
</div>
<div class="space-4"></div>
<div class="form-group ckind1">
<label class="col-sm-2 control-label no-padding-right" > 标的简介: </label>
<div class="col-sm-10">
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script>
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script>
<textarea name="c_content" rows="100%" style="width:100%" id="myEditor">{$list.c_content}</textarea>
<script type="text/javascript">
var editor = new UE.ui.Editor();
editor.render("myEditor");
</script>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right" ><h3 style="margin:0px">委托方信息</h3></label>
<div class="col-sm-11" style="padding-top:8px;"></div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right" > 委托人/卖方: </label>
<div class="col-sm-10">
<input type="text" name="c_seller" placeholder="必填" class="col-xs-10 col-sm-6" value="{$list.c_seller}" required/>
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right" > 交易主体唯一标志码: </label>
<div class="col-sm-10">
<input type="text" name="c_scode" placeholder="必填" class="col-xs-10 col-sm-6" value="{$list.c_scode}" />
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right" > 认证状态: </label>
<div class="col-sm-10" style="padding-top:8px;">
<input type="radio" name="c_sauth" id="sauth1" value="1" {if condition="$list['c_sauth'] eq 1"}checked{/if}> 未认证 &nbsp;&nbsp;
<input type="radio" name="c_sauth" id="sauth2" value="2" {if condition="$list['c_sauth'] eq 2"}checked{/if}> 已认证 &nbsp;&nbsp;
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right" > 委托人/卖方类型: </label>
<div class="col-sm-10" style="padding-top:8px;">
<input type="checkbox" name="c_stype[]" id="stype1" value="1" {if condition="in_array(1,explode(',',$list['c_stype']))"}checked{/if}> 卖方/授权方&nbsp;&nbsp;
<input type="checkbox" name="c_stype[]" id="stype2" value="2" {if condition="in_array(2,explode(',',$list['c_stype']))"}checked{/if}> 买方/被授权方 &nbsp;&nbsp;
<input type="checkbox" name="c_stype[]" id="stype3" value="3" {if condition="in_array(3,explode(',',$list['c_stype']))"}checked{/if}> 经纪商 &nbsp;&nbsp;
<input type="checkbox" name="c_stype[]" id="stype4" value="4" {if condition="in_array(4,explode(',',$list['c_stype']))"}checked{/if}> 服务商 &nbsp;&nbsp;
<input type="checkbox" name="c_stype[]" id="stype5" value="5" {if condition="in_array(5,explode(',',$list['c_stype']))"}checked{/if}> 专业中心 &nbsp;&nbsp;
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right" ><h3 style="margin:0px">文化资源数据/数据集</h3></label>
<div class="col-sm-11" style="padding-top:8px;"></div>
</div>
<div class="space-4"></div>
<div class="form-group ckind1">
<label class="col-sm-2 control-label no-padding-right" >文化资源数据: </label>
<div class="col-sm-10">
<textarea id="c_childs" name="c_childs" style="display:none"></textarea>
<button type="button" class="btn btn-minier btn-add" style="margin-bottom:10px;padding:2px 6px;" >添加</button>
<table class="table table-striped table-bordered table-hover dynamic-table" >
<thead>
<tr>
<th style="width:30px;">ID</th>
<th >资源名称</th>
<th style="width:100px;">标的编码</th>
<th style="width:100px;">标的ISLI编码</th>
<th style="width:100px;">大小</th>
<th style="width:100px;">格式</th>
<th style="width:100px;">时间</th>
<th style="width:160px;border-right:#CCC solid 1px;">操作</th>
</tr>
</thead>
<tbody>
{if condition="isset($list['c_childs']) and count($list['c_childs'])"}
{foreach name="list['c_childs']" id="vo" key="key"}
<?php echo parseTd($vo,$key+1);?>
{/foreach}
{/if}
</tbody>
</table>
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right" > 是否启用: </label>
<div class="col-sm-10" style="padding-top:5px;">
<input name='c_status' {if condition="$list['c_status'] eq 1"}checked{/if} value='1' class='ace ace-switch ace-switch-4 btn-flat' type='checkbox' />
<span class="lbl">&nbsp;&nbsp;默认启用</span>
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right" > 排序(从小到大): </label>
<div class="col-sm-10">
<input type="text" name="c_order" value="{$list['c_order']|default=50}" class="col-xs-10 col-sm-1" />
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right" > 开始日期: </label>
<div class="col-sm-10">
<input name="c_infostime" class="date-picker col-xs-10 col-sm-6" autocomplete="off" value="{$list['c_infostime']|date='Y-m-d',###}" type="text" data-date-format="yyyy-mm-dd">
<span class="lbl"></span>
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-right" > 结束日期: </label>
<div class="col-sm-10">
<input name="c_infoetime" class="date-picker col-xs-10 col-sm-6" autocomplete="off" value="{$list['c_infoetime']|date='Y-m-d',###}" type="text" data-date-format="yyyy-mm-dd">
<span class="lbl"></span>
</div>
</div>
<div class="space-4"></div>
<div class="clearfix form-actions">
<div class="col-md-offset-3 col-md-9">
<button class="btn btn-info" id="submitbtn" type="submit">
<i class="ace-icon fa fa-check bigger-110"></i>
保存
</button>
&nbsp; &nbsp; &nbsp;
<button class="btn" type="button" onclick="window.location.href='{:url('bigdata/showlist')}'">
<i class="ace-icon fa fa-undo bigger-110"></i>
返回
</button>
</div>
</div>
</div>
</form>
</div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog" style="width:40%">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close closebtn" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel"></h4>
</div>
<div class="modal-body" style="padding-top:60px;padding-bottom:30px;">
<form class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-3">资源名称</label>
<div class="col-sm-8">
<input type="text" id="cname" name="cname" class="form-control" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">标的编码</label>
<div class="col-sm-8">
<input type="text" id="ccode" name="ccode" class="form-control" readonly>(系统自动生成)
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">标的ISLI编码</label>
<div class="col-sm-8">
<input type="text" id="cicode" name="cicode" class="form-control" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">大小</label>
<div class="col-sm-8">
<input type="text" id="csize" name="csize" class="form-control" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">格式</label>
<div class="col-sm-8">
<input type="text" id="cformat" name="cformat" class="form-control" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">日期</label>
<div class="col-sm-8">
<input type="text" id="cdate" name="cdate" autocomplete="off" class="date-picker form-control" data-date-format="yyyy-mm-dd" required>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" id="modalbtn" class="btn btn-primary">保存</button>
<button type="button" class="btn btn-default closebtn" data-dismiss="modal">关闭</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div>
</div>
{/block}
{block name="scripts"}
<script>
$(function(){
$("#urlbtn").click(function(event){
event.preventDefault();
var url=$('[name="c_url"]').val();
if(typeof url!='undefined'&&url!=''){
var check=url.indexOf("http://");
var check2=url.indexOf("https://");
if(check==-1&&check2==-1){
url='http://'+url;
}
window.open(url);
}
});
var ckind=$("[name='c_kind']:checked").val();
if(ckind==1){
$(".ckind1").hide();
}else{
$(".ckind1").show();
}
$("[name='c_kind']").change(function(event){
var ckind=$(this).val();
console.log('ckind',ckind);
if(ckind==1){
$(".ckind1").hide();
}else{
$(".ckind1").show();
}
});
$("[name='c_stype[]']").change(function(event){
var len=$("[name='c_stype[]']:checked").length;
if(len>2){
$(this).attr('checked',false);
event.preventDefault();
return false;
}
});
$("#c_year").on("input propertychange",function(event){
var year=$(this).val();
if(year<=0)$("#c_year").val('');
});
var ckind=$("[name='c_kind']:checked").val();
console.log("ckind",ckind);
if(ckind==2){
$("[name='c_icode']").attr('readonly',true);
}else{
$("[name='c_icode']").attr('readonly',false);
}
$("[name='c_kind']").change(function(){
ckind=$("[name='c_kind']:checked").val();
if(ckind==2){
$("[name='c_icode']").attr('readonly',true);
}else{
$("[name='c_icode']").attr('readonly',false);
}
});
$("[name='c_pay']").change(function(){
var val=$("[name='c_pay']:checked").val();
console.log('val',val);
if(val==1){
$("[name='c_ptype']").prop('checked',false);
$("[name='c_pscope']").val('');
$("#cptype,#cpscope").show();
}else{
$("#cptype,#cpscope").hide();
}
});
{if condition="count($list['c_childs'])?:[]"}
var showlist={$list.c_childs|json_encode};
console.log(showlist);
if($.isArray(showlist)===false){
var showlist=new Array();
showlist=[];//本所鉴定意见
}
{else}
var showlist=new Array();
showlist=[];//本所鉴定意见
{/if}
$(".btn-add").click(function(){
var parent=$(this).parents('.form-group');
var title=parent.find(".control-label").html();
title=title.replace(':','');
$("#myModal .form").show();
$("#myModal .form-horizontal").removeAttr("current");
$(':input','#myModal .form-horizontal').val('').removeAttr('checked').removeAttr('selected');
$("#myModal .form-horizontal textarea").html("");
$("#myModal .modal-title").html(title);
$(".modal-backdrop").addClass('in').show();
$("#myModal").addClass('in').show();
});
$(".closebtn").click(function(){
$("#myModal").removeClass('in').hide();
$(".modal-backdrop").removeClass('in').hide();
$(".modal-body .form").hide();
});
$("#modalbtn").click(function(){
var parent=$("#myModal .form-horizontal");
var check=false;
var checkrow='';
parent.find("input").each(function(key,row){
var require=$(row).attr('required');
var val=$(row).val();
if(typeof require!='undefined'){
if(val==''||typeof val=='undefined'){
checkrow=row;
check=true;
return false;
}
console.log("row",row,require);
}
});
if(check){
$(checkrow).focus();
return false;
}
console.log("checkrow",checkrow,check);
var data=parent.serialize();
data=decodeURIComponent(data,true);
console.log("data",data);
var arr=data.split('&');
var table=$(".dynamic-table");
var last=table.find("tbody tr:last");
var thtml='';
var current=parent.attr('current');
var id=0;
if(typeof current=='undefined'){
if(typeof last=='undefined'||last.length==0){
thtml+='<td>1</td>';
}else{
id=last.find("td").eq(0).html();
id=parseInt(id);
thtml+='<td>'+(id+1)+'</td>';
}
}else{
var currentid=parent.attr('id');
currentid=parseInt(currentid);
thtml+='<td>'+currentid+'</td>';
}
var check=0;
var len=arr.length;
$.each(arr,function(cur,row){
var item=row.split('=');
var key=item[0];
var val=item[1];
val=decodeURI(val);
if(typeof val=='undefined'||val==''){
val='&nbsp;&nbsp;';
check++;
}else if(key=='kind'){
if(val==2)val='艺品拍';
else val='艺术品资产托管';
}
thtml+='<td>'+val+'</td>';
});
thtml+='<td><button type="button" class="btn btn-minier editbtn">编辑</button>&nbsp;&nbsp;<button type="button" class="btn btn-minier delbtn">删除</button></td>';
var html='<tr current='+id+' data='+data+'>'+thtml+'</tr>';
var curlist=showlist;
console.log(curlist);
$(".closebtn").trigger('click');
if(check==len){
return false;
}
if(typeof current=='undefined'){
table.find("tbody").append(html);
curlist[id]=JSON.stringify(arr);
}else{
curlist[current]=JSON.stringify(arr);
table.find("tbody tr").eq(current).attr('data',data);
table.find("tbody tr").eq(current).html(thtml);
}
console.log(curlist);
showlist=curlist;
console.log(showlist);
});
$(document).on("click", ".editbtn", function() {
var parent=$(this).parents("tr");
var currentid=parent.attr('current');
currentid=parseInt(currentid)+1;
var data=parent.attr('data');
console.log(data);
var arr=data.split('&');
var len=arr.length;
var table=$(this).parents(".dynamic-table");
_index=table.index(".dynamic-table");
var form=$("#myModal .form-horizontal");
$.each(arr,function(cur,row){
var item=row.split('=');
var key=item[0];
var val=item[1];
val=decodeURI(val);
var id='#'+key;
var obj=form.find(id);
var attr=obj.attr("type");
obj.val('');
obj.val(val);
});
var current=$(this).parents("tr").index();
form.attr('current',current);
form.attr('id',currentid);
var parent=$(this).parents('.form-group');
var title=parent.find(".control-label").html();
title=title.replace(':','');
$("#myModal .form").show();
$("#myModal .modal-title").html(title);
$(".modal-backdrop").addClass('in').show();
$("#myModal").addClass('in').show();
});
$(document).on( "click", ".delbtn", function() {
var parent=$(this).parents("tr");
var index=parent.attr('current');
var data=parent.attr('data');
var table=$(this).parents(".dynamic-table");
_index=table.index(".dynamic-table");
var msg=confirm("确认删除该纪录?");
if(msg==true){
parent.remove();
console.log(showlist);
index=parseInt(index);
showlist[index]='';
console.log(showlist);
}
});
$("#submitbtn").click(function(){
var cchilds=JSON.stringify(showlist);
$("#c_childs").html(cchilds);
return true;
});
});
$('.date-picker').datepicker({
autoclose: true,
todayHighlight: true,
language:'zh-CN',
})
$("#allbtn").click(function(){
var val=$("#allbtn").is(":checked");
console.log("checked",val);
$("[name='c_right[]']").prop("checked",val);
});
</script>
{/block}