123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- {extend name='admin@main'}
- {block name="content"}
- <form onsubmit="return false;" id="GoodsForm" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
- <div class="layui-card-body think-box-shadow padding-left-40">
- <div class="layui-form-item">
- <span class="color-green label-required-prev">藏品图片</span>
- <table class="layui-table">
- <thead>
- <tr>
- <td width="90px" class="text-left"><input name="cover" lay-verify="required" type="hidden" value="{$vo.covers|default=''}"></td>
- </tr>
- </thead>
- </table>
- <script>$('[name="cover"]').uploadOneImage(), $('[name="covers"]').uploadMultipleImage()</script>
- </div>
- <div class="layui-form-item">
- <span class="color-green label-required-prev">详情图片、视频、glb</span>
- <label class="layui-col-xs12 relative">
- <label class="layui-col-xs8 think-form-group-left">
- <input name="detail_img" value='{$vo.detail_img|default=""}' readonly placeholder="请上传" class="layui-input">
- </label>
- <a class="layui-col-xs2 layui-btn think-form-group-right" data-file="btn" data-field="detail_img" >
- <i class="layui-icon layui-icon-upload"></i> 上传
- </a>
- </label>
- </div>
- <!--
- <div class="layui-form-item layui-row layui-col-space15" style="display: none">
- <label class="layui-col-xs3 relative">
- <span class="color-green">发行方式</span>
- <select class="layui-select" required name="issue_mode" id="issue_mode" lay-filter="issue_mode" lay-search>
- <option value="1" {if isset($vo.issue_mode) && $vo.issue_mode eq 1}selected{/if}>普通发行</option>
- <option value="2" {if isset($vo.issue_mode) && $vo.issue_mode eq 2}selected{/if}>抽签发行</option>
- </select>
- </label>
- <label class="layui-col-xs3 relative apply_time" {if !isset($vo.issue_mode) || (isset($vo.issue_mode) && $vo.issue_mode eq 1)}style="display: none"{/if}>
- <span class="color-green">报名开始时间</span>
- <input name="apply_st" id="apply_st" value='{$vo.apply_st|default=""}' placeholder="" class="layui-input">
- </label>
- <label class="layui-col-xs3 relative apply_time" {if !isset($vo.issue_mode) || (isset($vo.issue_mode) && $vo.issue_mode eq 1)}style="display: none"{/if}>
- <span class="color-green">中签人数</span>
- <input name="draw_num" value='{$vo.draw_num|default=""}' placeholder="" class="layui-input">
- </label>
- </div>-->
- <div class="layui-form-item layui-row layui-col-space15">
- <label class="layui-col-xs3 relative">
- <span class="color-green">藏品名称</span>
- <input name="name" required class="layui-input" placeholder="请输入藏品名称" value="{$vo.name|default=''}">
- </label>
- <label class="layui-col-xs3 relative">
- <span class="color-green">藏品标签</span>
- <input name="label" required class="layui-input" placeholder="请输入藏品标签" value="{$vo.label|default=''}">
- </label>
- <label class="layui-col-xs3 relative">
- <span class="color-green">藏品库存</span>
- <input name="inventory" required type="number" class="layui-input" placeholder="请输入库存" value="{$vo.inventory|default='1'}">
- </label>
- <label class="layui-col-xs3 relative">
- <span class="color-green">藏品价格</span>
- <input name="price" required type="number" step="1" class="layui-input" placeholder="请输入价格" value="{$vo.price|default='0'}">
- </label>
- </div>
- <div class="layui-form-item layui-row layui-col-space15">
- <label class="layui-col-xs3 relative">
- <span class="color-green">发行日期</span>
- <input name="sell_time" required id="sell_time" readonly value='{$vo.sell_time|default=""}' placeholder="" class="layui-input">
- </label>
- <label class="layui-col-xs3 relative">
- <span class="color-green">限购数量(每人限购数量)</span>
- <input name="buy_count" required type="number" class="layui-input" placeholder="请输入限购数量" value="{$vo.buy_count|default='1'}">
- </label>
- <label class="layui-col-xs3 relative">
- <span class="color-green">转赠时间(第一次转赠限制时间[小时],0为不限制)</span>
- <input name="one_given_day" required type="number" class="layui-input" placeholder="转赠时间(第一次转赠限制时间[小时],0为不限制)" value="{$vo.one_given_day|default='0'}">
- </label>
- <label class="layui-col-xs3 relative">
- <span class="color-green">转赠时间(后续转赠限制限制时间[小时],0为不限制)</span>
- <input name="other_given_day" required type="number" step="1" class="layui-input" placeholder="转赠时间(后续转赠限制限制时间[小时],0为不限制)" value="{$vo.other_given_day|default='0'}">
- </label>
- </div>
- <div class="layui-form-item layui-row layui-col-space15">
- <label class="layui-col-xs3 relative">
- <span class="color-green">作者姓名</span>
- <input name="auth_name" required class="layui-input" placeholder="请输入作者姓名" value="{$vo.auth_name|default=''}">
- </label>
- </div>
- <div class="layui-form-item">
- <span class="color-green label-required-prev">作者头像</span>
- <table class="layui-table">
- <thead>
- <tr>
- <td width="90px" class="text-left"><input name="auth_img" type="hidden" value="{$vo.auth_imgs|default=''}"></td>
- </tr>
- </thead>
- </table>
- <script>$('[name="auth_img"]').uploadOneImage(), $('[name="auth_imgs"]').uploadMultipleImage()</script>
- </div>
- <div class="layui-form-item">
- <span class="color-green label-required-prev">分享图片</span>
- <table class="layui-table">
- <thead>
- <tr>
- <td width="90px" class="text-left"><input name="share_img" type="hidden" value="{$vo.share_img|default=''}"></td>
- </tr>
- </thead>
- </table>
- <script>$('[name="share_img"]').uploadOneImage()</script>
- </div>
- <div class="layui-form-item layui-row layui-col-space15">
- <label class="layui-col-xs3 relative">
- <span class="color-green">作品介绍</span>
- <textarea placeholder="请输入作品介绍" required class="layui-textarea" name="intro">{$vo.intro|default=""}</textarea>
- </label>
- <label class="layui-col-xs3 relative">
- <span class="color-green">权益说明</span>
- <textarea placeholder="请输入权益说明" required class="layui-textarea" name="instructions">{$vo.instructions|default=""}</textarea>
- </label>
- <label class="layui-col-xs3 relative">
- <span class="color-green">购买须知</span>
- <textarea placeholder="请输入购买须知" required class="layui-textarea" name="buy_notice">{$vo.buy_notice|default=""}</textarea>
- </label>
- <label class="layui-col-xs3 relative">
- <span class="color-green">温馨提示</span>
- <textarea placeholder="请输入温馨提示" required class="layui-textarea" name="warm_prompt">{$vo.warm_prompt|default=""}</textarea>
- </label>
- </div>
- <div class="layui-form-item">
- <span class="color-green label-required-prev">商品描述(多张图片)</span>
- <table class="layui-table">
- <thead>
- <tr>
- <td width="auto" class="text-left"><input name="describe" type="hidden" value="{$vo.describes|default=''}"></td>
- </tr>
- </thead>
- </table>
- <script>$('[name="logo"]').uploadOneImage(), $('[name="describe"]').uploadMultipleImage()</script>
- </div>
- <div class="layui-form-item text-center">
- {notempty name='vo.id'}<input type="hidden" name="id" value="{$vo.id}">{/notempty}
- <button class="layui-btn layui-btn-danger" onclick="history.go(-1);" type="button">取消编辑</button>
- <button class="layui-btn" type="submit">保存</button>
- </div>
- </div>
- </form>
- {/block}
- {block name='script'}
- <textarea class="layui-hide" id="goods-specs">{$vo.specs|raw|default=''}</textarea>
- <textarea class="layui-hide" id="goods-value">{$defaultValues|raw|default=''}</textarea>
- <script>
- layui.form.render();
- layui.use(['form', 'layedit', 'laydate'], function(){
- var form = layui.form
- ,layer = layui.layer
- ,layedit = layui.layedit
- ,laydate = layui.laydate;
- laydate.render({
- elem: '#sell_time'
- ,type: 'datetime'
- ,min:new Date().toLocaleString()
- });
- laydate.render({
- elem: '#apply_st'
- ,type: 'datetime'
- ,min:new Date().toLocaleString()
- });
- laydate.render({
- elem: '#apply_end'
- ,type: 'datetime'
- ,min:new Date().toLocaleString()
- });
- form.render();
- //日期
- laydate.render({
- elem: '#date'
- });
- laydate.render({
- elem: '#date1'
- });
- });
- form.on('select(issue_mode)', function(data){
- var issue_mode = data.value;
- console.log(issue_mode)
- //与之前选择的一样不处理
- if(issue_mode == 1){
- $(".apply_time").hide();
- }else{
- $(".apply_time").show();
- }
- layui.form.render();
- })
- </script>
- {/block}
|