123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257 |
- {extend name='admin@main'}
- {block name="content"}
- {include file='mall@store_goods/form_style'}
- <link rel="stylesheet" href="/static/plugs/layui/css/layui.css" media="all">
- <script src="/static/plugs/layui/layui.all.js" charset="utf-8"></script>
- <div class="think-box-shadow" style="height: 85%">
- <form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
- <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
- <legend>平台需求</legend>
- </fieldset>
- <div class="layui-tab-content">
- <div class="layui-tab-item layui-show">
- <div class="layui-form-item">
- <label class="layui-form-label label-required">需求标题</label>
- <div class="layui-input-block">
- <input name="title" maxlength="60" value='{$vo.title|default=""}' placeholder="" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item ">
- <label class="layui-form-label">需求标签</label>
- <div class="layui-input-block">
- <textarea placeholder="请输入标签" class="layui-textarea" name="label">{$vo.label|default=''}</textarea>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">会员账号</label>
- <div class="layui-input-block">
- <input name="phone" value='{$vo.phone|default=""}' placeholder="请输入会员账号" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label label-required">需求图片</label>
- <div class="layui-input-block">
- <table class="layui-table">
- <thead>
- <tr>
- <th class="text-center">封面</th>
- <th class="text-left">展示图片</th>
- </tr>
- <tr>
- <td width="90px" class="text-center"><input name="cover" type="hidden" value="{$vo.cover|default=''}"></td>
- <td width="auto" class="text-left"><input name="images" type="hidden" value="{$vo.images|default=''}"></td>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">发布会员</label>
- <div class="layui-input-block">
- <input value='{$user_info.name|default=""}' placeholder="" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">相关链接</label>
- <div class="layui-input-block">
- <input name="link" value='{$vo.link|default=""}' placeholder="" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">关联资料</label>
- <div class="layui-input-inline">
- <select name="datum_id" lay-filter ="datum_id" lay-search>
- <option value="0">请选择</option>
- {foreach $datum_list as $dk=>$dv}
- <option {if isset($vo.datum_id) && $vo.datum_id == $dv['id'] }selected{/if} data-dl_key="{$dk}" value="{$dv['id']}">{$dv['title']}</option>
- {/foreach}
- </select>
- </div>
- <div class="layui-input-inline">
- <select name="datum_item" lay-filter ="datum_item" lay-search>
- <option value="0">请选择</option>
- {foreach $datum_list as $vk=>$vv}
- {if isset($vo.datum_id) && $vo.datum_id == $vv['id'] }
- {foreach $vv['url_arr'] as $cln}
- <option {if isset($vo.datum_item) && $vo.datum_item == $cln['id']} selected {/if} value="{$cln['id']}">{$cln['title']}</option>
- {/foreach}
- {/if}
- {/foreach}
- </select>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">需求价格</label>
- <div class="layui-input-block">
- <input name="money" value='{$vo.money|default=""}' placeholder="" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label ">是否完成</label>
- <div class="layui-input-inline">
- <select name="is_over" lay-filter ="is_over" class="layui-select">
- {foreach ['待解决','已解决','开源项目'] as $ck=>$cv}
- <option {if isset($vo.is_over) && $vo.is_over == $ck } selected {/if} value="{$ck}">{$cv}</option>
- {/foreach}
- </select>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label ">评论开关</label>
- <div class="layui-input-inline">
- <select class="layui-select" name="comment_switch" id="comment_switch" lay-filter="comment_switch" lay-search>
- <option {if isset($vo.comment_switch) && $vo.comment_switch == 1 }selected{/if} value="1">开启</option>
- <option {if isset($vo.comment_switch) && $vo.comment_switch == 0 }selected{/if} value="0">关闭</option>
- </select>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">需求排序</label>
- <div class="layui-input-block">
- <input type="number" name="sort" value='{$vo.sort|default=""}' placeholder="请输入排序号" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">阅读量</label>
- <div class="layui-input-block">
- <input type="number" name="read_num" value='{$vo.read_num|default=""}' placeholder="请输入阅读量" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">热搜阅读量</label>
- <div class="layui-input-block">
- <input type="number" name="hot_num" value='{$vo.hot_num|default=""}' placeholder="请输入热搜阅读量" class="layui-input">
- <input type="hidden" name="hot_num_old" value='{$vo.hot_num|default=""}'>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label ">热搜定时时间</label>
- <div class="layui-input-block">
- <input name="regular_hot_end_time" value='{$vo.regular_hot_end_time|default=""}' class="layui-input">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label ">目标热搜阅读量</label>
- <div class="layui-input-block">
- <input name="hot_target_num" value='{$vo.hot_target_num|default=""}' placeholder="请输入目标热搜阅读量" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label ">上架时间</label>
- <div class="layui-input-block">
- <input name="release_time" value='{$vo.release_time|default=""}' class="layui-input">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">发布方电话</label>
- <div class="layui-input-block">
- <input name="solve_phone" value='{$vo.solve_phone|default=""}' placeholder="" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">发布方邮件</label>
- <div class="layui-input-block">
- <input name="solve_email" value='{$vo.solve_email|default=""}' placeholder="" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">发布方二维码</label>
- <div class="layui-input-block">
- <table class="layui-table">
- <thead>
- <tr>
- <td width="auto" class="text-left">
- <input name="solve_qrcode" type="hidden" value="{$vo.solve_qrcode|default=''}">
- </td>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- <div class="layui-form-item ">
- <label class="layui-form-label">需求简介</label>
- <div class="layui-input-block">
- <textarea class="layui-textarea" name="desc">{$vo.desc|default=""}</textarea>
- </div>
- </div>
- <div class="layui-form-item ">
- <label class="layui-form-label">需求描述</label>
- <div class="layui-input-block">
- <textarea name="content">{$vo.content|default=""}</textarea>
- </div>
- </div>
- {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
- <div class="layui-form-item text-center">
- <button class="layui-btn" type='submit'>保 存</button>
- <button class="layui-btn layui-btn-danger" type='button' onclick="history.go(-1)" data-close>返回</button>
- </div>
- </div>
- </div>
- </form>
- </div>
- <script>
- window.form.render();
- $('[name="cover"]').uploadOneImage();
- $('[name="solve_qrcode"]').uploadOneImage();
- $('[name="images"]').uploadMultipleImage();
- laydate.render({type: 'datetime', elem: '[name="release_time"]'})
- laydate.render({type: 'datetime', elem: '[name="regular_hot_end_time"]'})
- $('[name="company_logo"]').uploadOneImage();
- require(['ckeditor', 'angular'], function () {
- window.createEditor('[name="content"]', {
- height: 300,
- });
- })
- // 关联资料监听
- form.on('select(datum_id)', function(data){
- var cl_html = '<option value="0">请选择</option>';
- if(data.value == 0) {
- $("select[name='datum_item']").html(cl_html);
- }else{
- var dl_key = data.elem[data.elem.selectedIndex].dataset.dl_key;
- var datum_list = {:json_encode($datum_list)};
- $.each(datum_list[dl_key]['url_arr'],function (ck,cv) {
- cl_html +='<option value="'+cv.id+'">'+cv.title+'</option>';
- })
- $("select[name='datum_item']").html(cl_html);
- }
- window.form.render();
- });
- </script>
- {/block}
|