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

248 lines
11 KiB
HTML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<extend name="Public/base" />
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
<link href="__STATIC__/icons_alibaba/iconfont.css" rel="stylesheet">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" src="__STATIC__/provincecityarea/AreaData_min.js"></script>
<script src="__STATIC__/layer/layer.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<style>
.tabcon1711 input.time {
width: 150px;
}
#form .txt_area {
width: 300px;
height: 150px;
}
.tabcon1711 .form_unit {
margin-left: 2px;
}
.tabcon1711 .mustmark {
margin-left:-7px;
}
.list-ratio {
display: table;
}
.list-ratio .li-ratio {
display: flex;
margin-bottom: 20px;
align-items: center;
}
.list-ratio .li-ratio .turnover, .list-ratio .li-ratio .turnover-ratio {
position: relative;
}
.list-ratio .li-ratio .turnover span, .list-ratio .li-ratio .turnover-ratio .error-message {
color: red;
position: absolute;
left: 0;
top: 30px;
white-space: nowrap;
display: none;
}
.iconfont-btn {
cursor: pointer;
}
.iconfont-style {
font-size: 18px;
color: #fff;
border-radius: 4px;
border: 0;
padding: 5px;
margin-left: 10px;
}
.iconfont-selected {
background-color: #0A9AF2;
}
.iconfont-selected:hover {
background-color: #03a9f4;
}
.iconfont-unselected {
background-color: #999;
}
.iconfont-unselected:hover {
background-color: #ababab;
}
input[type=number]{
padding: 4px 6px;
font-size: 12px;
line-height: 20px;
color: #555;
vertical-align: middle;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
background-color: #fff;
border: 1px solid #ccc;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
-webkit-transition: border linear .2s, box-shadow linear .2s;
-moz-transition: border linear .2s, box-shadow linear .2s;
-o-transition: border linear .2s, box-shadow linear .2s;
transition: border linear .2s, box-shadow linear .2s;
}
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">{$title}</h3>
<p class="description_text">说明:单位(万元)</p>
</div>
<!-- 标签页导航 -->
<div class="tab-wrap">
<div class="tab-content tabcon1711">
<!-- 表单 -->
<form id="form" action="{:U('edit')}" method="post" class="form-horizontal">
<!-- 基础文档模型 -->
<div id="tab1" class="tab-pane in tab1">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<input type="text" name="is_edit" id="is_edit" value="{$is_edit}" style="display: none;">
<if condition="$is_edit eq 1">
<input type="text" name="year" value="{$data['count_year']}" style="display: none;">
<input type="text" name="type" value="{$data['type']}" style="display: none;">
<if condition="$data['chenge_name'] eq 0">
<input type="text" name="name" value="{$data['orgin_name']}" style="display: none;">
</if>
</if>
<tr>
<td class="l"><i class="mustmark">*</i>年度:</td>
<td class="r table_radio">
<div style="float: left;">
<select id="year" name="year" style="width:150px;" <if condition="$is_edit eq 1">disabled</if> >
<volist name="YearList" id="vo">
<option value="{$vo.value}" <if condition="$vo.value eq $data['count_year']">selected
</if> >{$vo.name}</option>
</volist>
</select>
</div>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark">*</i>类型:</td>
<td class="r table_radio">
<div style="float: left;">
<select id="type" name="type" style="width:150px;" <if condition="$is_edit eq 1">disabled</if> >
<option value="1" <if condition="1 eq $data['type']">selected </if> >业务收入</option>
<option value="2" <if condition="2 eq $data['type']">selected </if> >业务成本</option>
</select>
</div>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark">*</i>类型名称:</td>
<td class="r table_radio">
<div style="float: left;">
<input type="text" class="txt ratio" name="name" id="name" value="{$data['name']}" placeholder="请输入名称" style="width: 150px;" <if condition="($data['chenge_name'] eq 0) AND ($is_edit eq 1)">disabled</if>>
</div>
</td>
</tr>
<if condition="$is_edit eq 0">
<for start="0" end="12">
<tr>
<td class="l">{$i-0+1}月份:</td>
<td class="r table_radio">
<div style="float: left;">
<input type="number" class="txt ratio" name="value[]" id="name" value="0" placeholder="" οninput="value=value.replace(/[^\w\.\/]/ig, '')" style="width: 150px;">
</div>
</td>
</tr>
</for>
<else />
<for start="0" end="12">
<tr>
<td class="l">{$i-0+1}月份:</td>
<td class="r table_radio">
<div style="float: left;">
<input type="number" class="txt ratio" name="ids[]" value="{$data['ids'][$i]}" style="display: none;">
<input type="number" class="txt ratio" name="value[]" id="name" value="{$data['value'][$i]}" placeholder="" οninput="value=value.replace(/[^\w\.\/]/ig, '')" style="width: 150px;">
</div>
</td>
</tr>
</for>
</if>
</tbody>
</table>
</div>
<div class="form-item cf">
<button class="submit_btn mlspacing" id="submit" type="submit" target-form="form-horizontal">
保存
</button>
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back();" >
返回
</a>
</div>
</form>
</div>
</div>
</block>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script src="__STATIC__/czinputcheck.js?v=1.29" type="text/javascript"></script>
<script type="text/javascript">
//导航高亮
highlight_subnav("{:U('lists')}");
$(".select_gallery").select2();
$(function(){
subevn();
function subevn(){
$('#submit').off("click");
$('#submit').click(function (e) {
//查看是否报错
var name = $("#name").val();
if(name.length < 1){
layer.msg("名称不能为空", {icon: 2});
return false;
}
var target = $('form').get(0).action;
var query = $('form').serialize();
var that = this;
$(that).addClass('disabled').attr('autocomplete','off').prop('disabled',true);
$.post(target,query).success(function(data){
if(layer) {layer.closeAll('loading');}
if (data.code==1) {
if (data.url) {
updateAlert(data.msg + ' 页面即将自动跳转~');
}else{
updateAlert(data.msg);
}
setTimeout(function(){
$(that).removeClass('disabled').prop('disabled',false);
if (data.url) {
location.href=data.url;
}else if( $(that).hasClass('no-refresh')){
$('#tip').find('.tipclose').click();
}else{
location.reload();
}
},1500);
}else{
$(that).removeClass('disabled').prop('disabled',false);
layer.msg(data.msg,{icon: 2});
}
});
});
}
});
</script>
</block>