123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- {extend name="public/container"}
- {block name="head_top"}
- <link href="{__ADMIN_PATH}plug/ueditor/themes/default/css/ueditor.css" type="text/css" rel="stylesheet">
- <link href="{__ADMIN_PATH}module/wechat/news/css/style.css" type="text/css" rel="stylesheet">
- <link href="{__FRAME_PATH}css/plugins/chosen/chosen.css" rel="stylesheet">
- <script type="text/javascript" src="{__ADMIN_PATH}plug/ueditor/third-party/jquery-1.10.2.min.js"></script>
- <script type="text/javascript" src="{__ADMIN_PATH}plug/ueditor/third-party/xss.min.js"></script>
- <script type="text/javascript" charset="utf-8" src="{__ADMIN_PATH}plug/ueditor/ueditor.config.js"></script>
- <script type="text/javascript" charset="utf-8" src="{__ADMIN_PATH}plug/ueditor/ueditor.all.js"></script>
- <script src="{__ADMIN_PATH}frame/js/ajaxfileupload.js"></script>
- <script src="{__ADMIN_PATH}plug/validate/jquery.validate.js"></script>
- <script src="{__FRAME_PATH}js/plugins/chosen/chosen.jquery.js"></script>
- <style>
- .wrapper-content {
- padding: 0 !important;
- }
- </style>
- {/block}
- {block name="content"}
- <div class="row">
- <div class="col-sm-12 panel panel-default">
- <div class="panel-body" style="padding: 30px">
- <form class="form-horizontal" id="signupForm">
- <input type="hidden" name="id" id="id" value="{$model.id}">
- <div class="form-group">
- <div class="col-md-12">
- <div class="input-group">
- <span class="input-group-addon">职务名称:</span>
- <input maxlength="20" placeholder="请在职务名称" name="job_name" class="layui-input" id="job_name"
- value="{$model.job_name}">
- </div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-md-12">
- <div class="input-group">
- <span class="input-group-addon">排序:</span>
- <input maxlength="3" placeholder="请输入排序" name="rank" class="layui-input" id="rank"
- value="{$model.rank}" type="number">
- </div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-md-12">
- <div class="input-group">
- <span class="input-group-addon">是否启用:</span>
- <select name="is_show" id="is_show" aria-controls="editable" class="form-control input-sm">
- <option value="1" {eq name="model.is_show" value="1"}selected="selected"{/eq}>启用</option>
- <option value="0" {eq name="model.is_show" value="0"}selected="selected"{/eq}>禁用</option>
- </select>
- </div>
- </div>
- </div>
- <div class="form-actions">
- <div class="row">
- <div class="col-md-9">
- <button type="button" style="margin-left: 44%" class="btn btn-w-m btn-info add_mer">提交
- </button>
- </div>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- <script src="{__ADMIN_PATH}js/layuiList.js"></script>
- {/block}
- {block name="script"}
- <script>
- $('.add_mer').on('click', function () {
- var list = {};
- list.id = $('#id').val();/* 企业名 */
- list.job_name = $('#job_name').val();/* 企业名 */
- list.is_show = $('#is_show').val();
- list.rank = $('#rank').val();
- if (list.job_name == '') {
- $eb.message('error', '请输入企业名');
- return false;
- }
- var data = {};
- var index = layList.layer.load(1, {
- shade: [0.5, '#fff'] //0.1透明度的白色背景
- });
- ;
- $.ajax({
- url: "{:Url('edit_job')}",
- data: list,
- type: 'post',
- dataType: 'json',
- success: function (re) {
- layer.close(index);
- if (re.code == 200) {
- data[re.data] = list;
- $('.type-all>.active>.new-id').val(re.data);
- $eb.message('success', re.msg);
- location.reload();
- setTimeout(function (e) {
- parent.$(".J_iframe:visible")[0].contentWindow.location.reload();
- layer.close(index);
- layList.reload();
- }, 600)
- } else {
- $eb.message('error', re.msg);
- }
- },
- error: function () {
- layer.close(index);
- }
- })
- });
- $(document).ready(function () {
- var config = {
- ".chosen-select": {},
- ".chosen-select-deselect": {allow_single_deselect: true},
- ".chosen-select-no-single": {disable_search_threshold: 10},
- ".chosen-select-no-results": {no_results_text: "沒有找到你要搜索的分类"},
- ".chosen-select-width": {width: "95%"}
- };
- for (var selector in config) {
- $(selector).chosen(config[selector])
- }
- })
- </script>
- {/block}
|