504 lines
26 KiB
HTML
504 lines
26 KiB
HTML
{include file="public/header" /}
|
|
|
|
|
|
|
|
|
|
|
|
<div class="page">
|
|
<div class="fixed-bar">
|
|
<div class="item-title">
|
|
<div class="subject">
|
|
<h3>{$Think.lang.goods_class_index_class}</h3>
|
|
</div>
|
|
{include file="public/admin_items" /}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="explanation" id="explanation">
|
|
<div class="title" id="checkZoom">
|
|
<h4 title="{$Think.lang.ds_explanation_tip}">{$Think.lang.ds_explanation}</h4>
|
|
<span id="explanationZoom" title="{$Think.lang.ds_explanation_close}" class="arrow"></span>
|
|
</div>
|
|
<ul>
|
|
<li>{$Think.lang.goods_class_edit_prompts_one}</li>
|
|
<li>{$Think.lang.goods_class_edit_prompts_two}</li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
<form id="goods_class_form" name="goodsClassForm" enctype="multipart/form-data" method="post">
|
|
<input type="hidden" name="gc_id" value="{$class_array.gc_id}" />
|
|
<input type="hidden" name="gc_parent_id" id="gc_parent_id" value="{$class_array.gc_parent_id}" />
|
|
<input type="hidden" name="old_type_id" value="{$class_array.type_id}">
|
|
<table class="ds-default-table">
|
|
<tbody>
|
|
<tr class="noborder">
|
|
<td colspan="2" class="required"><label class="gc_name validation" for="gc_name">{$Think.lang.goods_class_index_name}:</label></td>
|
|
</tr>
|
|
<tr class="noborder">
|
|
<td class="vatop rowform"><input type="text" maxlength="20" value="{$class_array.gc_name}" name="gc_name" id="gc_name" class="txt"></td>
|
|
<td class="vatop tips"></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" class="required"><label for="parent_id">{$Think.lang.goods_class_add_sup_class}:</label></td>
|
|
</tr>
|
|
<tr class="noborder">
|
|
<td class="vatop rowform"><select name="gc_parent_id" id="gc_parent_id">
|
|
<option value="{$class_array.gc_parent_id}">不更改所属分类(更改下拉)</option>
|
|
{notempty name="parent_list"}
|
|
{foreach name="parent_list" item="v" key="k" }
|
|
<option {if $class_array.gc_parent_id == $v.gc_id}selected='selected'{/if} value="{$v.gc_id}">{$v.gc_name|raw}</option>
|
|
{/foreach}
|
|
{/notempty}
|
|
</select></td>
|
|
<td class="vatop tips"><span style="color:#ff0000">注意:不要把顶级分类整体移动到其它分类下;</span> {$Think.lang.goods_class_add_sup_class_notice}</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" class="required"><label for="pic">项目图片:</label></td>
|
|
</tr>
|
|
<tr class="noborder">
|
|
<td class="vatop rowform">
|
|
{notempty name="$class_array.pic"}
|
|
<span class="type-file-show"><img class="show_image" src="{$Think.ADMIN_SITE_ROOT}/images/preview.png">
|
|
<div class="type-file-preview"><img src="{$class_array.pic}"></div>
|
|
</span>
|
|
{/notempty}
|
|
<span class="type-file-box">
|
|
<input type='text' name='textfield' id='textfield1' class='type-file-text' />
|
|
<input type='button' name='button' id='button1' value='上传' class='type-file-button' />
|
|
<input name="pic" type="file" class="type-file-file" id="pic" size="30" hidefocus="true" ds_type="change_pic">
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td colspan="2" class="required"><label for="logo">项目LOGO:</label></td>
|
|
</tr>
|
|
<tr class="noborder">
|
|
<td class="vatop rowform">
|
|
|
|
{notempty name="$class_array.pro_logo"}
|
|
<span class="type-file-show"><img class="show_image" src="{$Think.ADMIN_SITE_ROOT}/images/preview.png">
|
|
<div class="type-file-preview"><img src="{$class_array.pro_logo}"></div>
|
|
</span>
|
|
{/notempty}
|
|
|
|
<span class="type-file-box">
|
|
<input type='text' name='textfield' id='textfield2' class='type-file-text' />
|
|
<input type='button' name='button' id='button1' value='上传' class='type-file-button' />
|
|
<input name="logo" type="file" class="type-file-file" id="logo" size="30" hidefocus="true" ds_type="change_logo">
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td colspan="2" class="required"><label for="big">项目Banner大图:</label></td>
|
|
</tr>
|
|
<tr class="noborder">
|
|
<td class="vatop rowform">
|
|
|
|
{notempty name="$class_array.pro_big"}
|
|
<span class="type-file-show"><img class="show_image" src="{$Think.ADMIN_SITE_ROOT}/images/preview.png">
|
|
<div class="type-file-preview"><img src="{$class_array.pro_big}"></div>
|
|
</span>
|
|
{/notempty}
|
|
|
|
<span class="type-file-box">
|
|
<input type='text' name='textfield' id='textfield3' class='type-file-text' />
|
|
<input type='button' name='button' id='button1' value='上传' class='type-file-button' />
|
|
<input name="big" type="file" class="type-file-file" id="big" size="30" hidefocus="true" ds_type="change_big">
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr class="noborder">
|
|
<td colspan="2" id="gcategory">
|
|
<select class="class-select">
|
|
<option value="0">{$Think.lang.ds_please_choose}...</option>
|
|
{notempty name="gc_list"}
|
|
{foreach name="gc_list" item="v" key="k" }
|
|
{if $v.gc_parent_id == 0}
|
|
<option value="{$v.gc_id}">{$v.gc_name}</option>
|
|
{/if}
|
|
{/foreach}
|
|
{/notempty}
|
|
</select>{$Think.lang.ds_quickly_targeted}</td>
|
|
</tr>
|
|
<tr class="noborder">
|
|
<td class="vatop rowform"><input type="hidden" name="t_name" id="t_name" value="{$class_array.type_name}" />
|
|
<input type="hidden" name="t_sign" id="t_sign" value="" />
|
|
<div id="type_div" class="goods-sort-type">
|
|
<div class="container">
|
|
<dl>
|
|
<dd>
|
|
<input type="radio" name="t_id" value="0" {if $class_array.type_id}checked="checked"{/if} />{$Think.lang.goods_class_null_type}
|
|
</dd>
|
|
</dl>
|
|
{notempty name="type_list"}
|
|
{foreach name="type_list" item="val" key="k" }
|
|
{notempty name="$val.type"}
|
|
<dl>
|
|
<dt id="type_dt_{$k}">{$val.name}</dt>
|
|
{foreach name="$val.type" item="v" }
|
|
<dd>
|
|
<input type="radio" class="radio" name="t_id" value="{$v.type_id}" {if $class_array.type_id == $v.type_id}checked="checked"{/if} />
|
|
<span>{$v.type_name}</span></dd>
|
|
{/foreach}
|
|
</dl>
|
|
{/notempty}
|
|
{/foreach}
|
|
{/notempty}
|
|
</div>
|
|
</div></td>
|
|
<td class="vatop tips">{$Think.lang.goods_class_add_type_desc_one}<a onclick="window.parent.openItem('index,type,goods')" href="JavaScript:void(0);">{$Think.lang.ds_type}</a>{$Think.lang.goods_class_add_type_desc_two}</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td colspan="2" class="required"><label for="gc_sort">{$Think.lang.ds_sort}:</label></td>
|
|
</tr>
|
|
<tr class="noborder">
|
|
<td class="vatop rowform"><input type="text" value="{if $class_array.gc_sort == ''}0{else/}{$class_array.gc_sort}{/if}" name="gc_sort" id="gc_sort" class="txt"></td>
|
|
<td class="vatop tips">{$Think.lang.goods_class_add_update_sort}</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="2" class="required"><label>项目描述:</label></td>
|
|
</tr>
|
|
<tr class="noborder">
|
|
<td class="vatop rowform">
|
|
<textarea type="text" name="pro_desc" style="height:100px;"> {$class_array.pro_desc}</textarea>
|
|
</td>
|
|
<td class="vatop tips">请简短概括</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="2" class="required"><label>项目地点:</label></td>
|
|
</tr>
|
|
<tr class="noborder">
|
|
<td class="vatop rowform">
|
|
<input type="text" value="{$class_array.pro_locate}" name="pro_locate" id="pro_locate" class="txt">
|
|
</td>
|
|
<td class="vatop tips">填写项目地点位置</td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
<td colspan="2" class="required"><label>提供院校:</label></td>
|
|
</tr>
|
|
<tr class="noborder">
|
|
<td class="vatop rowform"><input type="text" value="{$class_array.pro_college}" name="pro_college" id="pro_college" class="txt"></td>
|
|
<td class="vatop tips">填写项目提供院校</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td colspan="2" class="required"><label>项目时间:</label></td>
|
|
</tr>
|
|
<tr class="noborder">
|
|
<td class="vatop rowform"><input type="text" value="{$class_array.pro_period}" name="pro_period" id="pro_period" class="txt"></td>
|
|
<td class="vatop tips">填写项目时间区间</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td colspan="2" class="required"><label>项目时长:</label></td>
|
|
</tr>
|
|
<tr class="noborder">
|
|
<td class="vatop rowform"><input type="text" value="{$class_array.pro_duration}" name="pro_duration" id="pro_duration" class="txt"></td>
|
|
<td class="vatop tips">填写项目时间时长</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td colspan="2" class="required"><label>面向人群:</label></td>
|
|
</tr>
|
|
<tr class="noborder">
|
|
<td class="vatop rowform"><input type="text" value="{$class_array.pro_people}" name="pro_people" id="pro_people" class="txt"></td>
|
|
<td class="vatop tips">填写面向人群</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td colspan="2" class="required"><label>项目特色:</label></td>
|
|
</tr>
|
|
<tr class="noborder">
|
|
<td class="vatop rowform">
|
|
{:build_editor(['name'=>'pro_info','content'=>$class_array.pro_info?htmlspecialchars_decode($class_array.pro_info):''])}
|
|
|
|
<textarea name="pro_info" id="pro_info" class="textarea h60 w400"></textarea>
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td colspan="2" class="required"><label for="pro_info_image">项目特色图片:</label></td>
|
|
</tr>
|
|
<tr class="noborder">
|
|
<td class="vatop rowform">
|
|
{notempty name="$class_array.pro_info_image"}
|
|
<span class="type-file-show"><img class="show_image" src="{$Think.ADMIN_SITE_ROOT}/images/preview.png">
|
|
<div class="type-file-preview"><img src="{$class_array.pro_info_image}"></div>
|
|
</span>
|
|
{/notempty}
|
|
|
|
|
|
<span class="type-file-box">
|
|
<input type='text' name='textfield' id='textfield4' class='type-file-text' />
|
|
<input type='button' name='button' id='button1' value='上传' class='type-file-button' />
|
|
<input name="pro_info_image" type="file" class="type-file-file" id="pro_info_image" size="30" hidefocus="true" ds_type="change_pro_info_image">
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="2" class="required"><label>校区概况:</label></td>
|
|
</tr>
|
|
<tr class="noborder">
|
|
<td class="vatop rowform">
|
|
<textarea type="text" name="pro_overview" style="height:100px;">
|
|
|
|
{$class_array.pro_overview}
|
|
</textarea>
|
|
<td class="vatop tips"></td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td colspan="2" class="required"><label for="pro_overview_image">校区概况图片:</label></td>
|
|
</tr>
|
|
|
|
<tr class="noborder">
|
|
<td class="vatop rowform">
|
|
|
|
{notempty name="$class_array.pro_overview_image1"}
|
|
<span class="type-file-show"><img class="show_image" src="{$Think.ADMIN_SITE_ROOT}/images/preview.png">
|
|
<div class="type-file-preview"><img src="{$class_array.pro_overview_image1}"></div>
|
|
</span>
|
|
{/notempty}
|
|
|
|
<span class="type-file-box">
|
|
<input type='text' name='textfield' id='textfield5' class='type-file-text' />
|
|
<input type='button' name='button' id='button1' value='上传' class='type-file-button' />
|
|
<input name="pro_overview_image1" type="file" class="type-file-file" id="pro_overview_image1" size="30" hidefocus="true" ds_type="change_pro_info_image">
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
<tr class="noborder">
|
|
<td class="vatop rowform">
|
|
|
|
{notempty name="$class_array.pro_overview_image2"}
|
|
<span class="type-file-show"><img class="show_image" src="{$Think.ADMIN_SITE_ROOT}/images/preview.png">
|
|
<div class="type-file-preview"><img src="{$class_array.pro_overview_image2}"></div>
|
|
</span>
|
|
{/notempty}
|
|
|
|
<span class="type-file-box">
|
|
<input type='text' name='textfield' id='textfield6' class='type-file-text' />
|
|
<input type='button' name='button' id='button1' value='上传' class='type-file-button' />
|
|
<input name="pro_overview_image2" type="file" class="type-file-file" id="pro_overview_image2" size="30" hidefocus="true" ds_type="change_pro_info_image">
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr class="noborder">
|
|
<td class="vatop rowform">
|
|
{notempty name="$class_array.pro_overview_image3"}
|
|
<span class="type-file-show"><img class="show_image" src="{$Think.ADMIN_SITE_ROOT}/images/preview.png">
|
|
<div class="type-file-preview"><img src="{$class_array.pro_overview_image3}"></div>
|
|
</span>
|
|
{/notempty}
|
|
|
|
|
|
<span class="type-file-box">
|
|
<input type='text' name='textfield' id='textfield7' class='type-file-text' />
|
|
<input type='button' name='button' id='button1' value='上传' class='type-file-button' />
|
|
<input name="pro_overview_image3" type="file" class="type-file-file" id="pro_overview_image3" size="30" hidefocus="true" ds_type="change_pro_info_image">
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="2" class="required"><label>住宿信息:</label></td>
|
|
</tr>
|
|
<tr class="noborder">
|
|
<td class="vatop rowform">
|
|
<textarea type="text" name="pro_accommodation" style="height:100px;">
|
|
|
|
{$class_array.pro_accommodation}
|
|
</textarea>
|
|
<td class="vatop tips"></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="2" class="required"><label for="pro_accommodation_image">住宿信息图片:</label></td>
|
|
</tr>
|
|
<tr class="noborder">
|
|
<td class="vatop rowform">
|
|
|
|
{notempty name="$class_array.pro_accommodation_image"}
|
|
<span class="type-file-show"><img class="show_image" src="{$Think.ADMIN_SITE_ROOT}/images/preview.png">
|
|
<div class="type-file-preview"><img src="{$class_array.pro_accommodation_image}"></div>
|
|
</span>
|
|
{/notempty}
|
|
|
|
<span class="type-file-box">
|
|
<input type='text' name='textfield' id='textfield8' class='type-file-text' />
|
|
<input type='button' name='button' id='button1' value='上传' class='type-file-button' />
|
|
<input name="pro_accommodation_image" type="file" class="type-file-file" id="pro_accommodation_image" size="30" hidefocus="true" ds_type="change_pro_info_image">
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td colspan="2" class="required"><label>机票信息:</label></td>
|
|
</tr>
|
|
<tr class="noborder">
|
|
<td class="vatop rowform">
|
|
<textarea type="text" name="pro_flight" style="height:100px;">
|
|
|
|
{$class_array.pro_flight}
|
|
</textarea>
|
|
<td class="vatop tips"></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="2" class="required"><label>开始申请:</label></td>
|
|
</tr>
|
|
<tr class="noborder">
|
|
<td class="vatop rowform">
|
|
<textarea type="text" name="pro_apply" style="height:100px;">
|
|
|
|
{$class_array.pro_apply}
|
|
</textarea>
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
|
|
</tbody>
|
|
<tfoot>
|
|
<tr class="tfoot">
|
|
<td colspan="15" ><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</form>
|
|
</div>
|
|
<script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js" charset="utf-8"></script>
|
|
<script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/jquery.mousewheel.js"></script>
|
|
<script>
|
|
$(function() {
|
|
$("#pic").change(function() {
|
|
$("#textfield1").val($(this).val());
|
|
});
|
|
|
|
$("#logo").change(function() {
|
|
$("#textfield2").val($(this).val());
|
|
});
|
|
|
|
|
|
$("#big").change(function() {
|
|
$("#textfield3").val($(this).val());
|
|
});
|
|
|
|
$("#pro_info_image").change(function() {
|
|
$("#textfield4").val($(this).val());
|
|
});
|
|
|
|
|
|
$("#pro_overview_image1").change(function() {
|
|
$("#textfield5").val($(this).val());
|
|
});
|
|
|
|
$("#pro_overview_image2").change(function() {
|
|
$("#textfield6").val($(this).val());
|
|
});
|
|
|
|
$("#pro_overview_image3").change(function() {
|
|
$("#textfield7").val($(this).val());
|
|
});
|
|
|
|
$("#pro_accommodation_image").change(function() {
|
|
$("#textfield8").val($(this).val());
|
|
});
|
|
|
|
$('input[type="radio"][name="t_id"]').change(function() {
|
|
// 标记类型时候修改 修改为ok
|
|
var t_id = {$class_array.type_id};
|
|
if (t_id != $(this).val()) {
|
|
$('#t_sign').val('ok');
|
|
} else {
|
|
$('#t_sign').val('');
|
|
}
|
|
|
|
if ($(this).val() == '0') {
|
|
$('#t_name').val('');
|
|
} else {
|
|
$('#t_name').val($(this).next('span').html());
|
|
}
|
|
});
|
|
|
|
$('#goods_class_form').validate({
|
|
errorPlacement: function(error, element) {
|
|
error.appendTo(element.parent().parent().prev().find('td:first'));
|
|
},
|
|
rules: {
|
|
gc_name: {
|
|
required: true,
|
|
remote: {
|
|
url: "{:url('Goodsclass/ajax',['branch'=>'check_class_name'])}",
|
|
type: 'get',
|
|
data: {
|
|
gc_name: function() {
|
|
return $('#gc_name').val();
|
|
},
|
|
gc_parent_id: function() {
|
|
return $('#gc_parent_id').val();
|
|
},
|
|
gc_id: '{$class_array.gc_id}'
|
|
}
|
|
}
|
|
},
|
|
gc_sort: {
|
|
number: true
|
|
}
|
|
},
|
|
messages: {
|
|
gc_name: {
|
|
required: '{$Think.lang.goods_class_add_name_null}',
|
|
remote: '{$Think.lang.goods_class_add_name_exists}'
|
|
},
|
|
gc_sort: {
|
|
number: '{$Think.lang.goods_class_add_sort_int}'
|
|
}
|
|
}
|
|
});
|
|
|
|
// 类型搜索
|
|
$(document).off('change',"#gcategory > select").on("change","#gcategory > select", function() {
|
|
type_scroll($(this));
|
|
});
|
|
});
|
|
var typeScroll = 0;
|
|
function type_scroll(o) {
|
|
var id = o.val();
|
|
if (!$('#type_dt_' + id).is('dt')) {
|
|
return false;
|
|
}
|
|
|
|
$('#type_div').scrollTop(-typeScroll);
|
|
var sp_top = $('#type_dt_' + id).offset().top;
|
|
var div_top = $('#type_div').offset().top;
|
|
$('#type_div').scrollTop(sp_top - div_top);
|
|
typeScroll = sp_top - div_top;
|
|
}
|
|
gcategoryInit('gcategory');
|
|
</script>
|