299 lines
14 KiB
HTML
Executable File
299 lines
14 KiB
HTML
Executable File
{layout name="manager/layout" /}
|
||
<style>
|
||
.w-e-text-container{
|
||
height: 600px !important;/*原div是行内样式设置的高度300px*/
|
||
}
|
||
|
||
</style>
|
||
<div class="layuimini-container location-operate-page">
|
||
<div class="layuimini-main">
|
||
<div class="layui-form layuimini-form">
|
||
|
||
<div class="layui-tab layui-tab-card form-tab-card">
|
||
<ul class="layui-tab-title">
|
||
<li class="layui-this">基本信息</li>
|
||
<li>规格信息</li>
|
||
<li >商品详情</li>
|
||
</ul>
|
||
|
||
<div class="layui-tab-content pad-15">
|
||
<!-- 基本信息 -->
|
||
<div class="layui-tab-item layui-show">
|
||
<!-- 分类 -->
|
||
<div class="layui-form-item layui-col-md6">
|
||
<label class="layui-form-label required">分类</label>
|
||
<div class="layui-input-block">
|
||
<div id="parent-category" data-list="{$categoryJson ?? ''}"></div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-form-item layui-row">
|
||
<div class="layui-inline layui-col-md6">
|
||
<label class="layui-form-label required">商品名称</label>
|
||
<div class="layui-input-block">
|
||
<input type="text" name="item[name]" placeholder="请输入商品名称" class="layui-input" value="{$item.name ?? ''}"
|
||
maxlength="250">
|
||
</div>
|
||
</div>
|
||
<div class="layui-inline layui-col-md6">
|
||
<label class="layui-form-label">商品副标</label>
|
||
<div class="layui-input-block">
|
||
<input type="text" name="item[subtitle]" placeholder="请输入商品副标题" class="layui-input"
|
||
value="{$item.subtitle ?? ''}" maxlength="1000">
|
||
</div>
|
||
</div>
|
||
<div class="layui-inline layui-col-md6">
|
||
<label class="layui-form-label">单位</label>
|
||
<div class="layui-input-block">
|
||
<input type="text" name="item[unit]" placeholder="请输入商品计量单位" class="layui-input"
|
||
value="{$item.unit ?? ''}" >
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-form-item layui-hide">
|
||
<div class="layui-inline">
|
||
<label class="layui-form-label">限购周期</label>
|
||
<div class="layui-input-block">
|
||
<input type="number" name="item[limit_time]" placeholder="30 表示30天内限购X件" class="layui-input"
|
||
value="{$item.limit_time ?? 0}">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-inline">
|
||
<label class="layui-form-label">限购数量</label>
|
||
<div class="layui-input-block">
|
||
<input type="number" name="item[limit_num]" placeholder="请输入限购数量" class="layui-input"
|
||
value="{$item.limit_num ?? 0}">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-inline">
|
||
<label class="layui-input-block"> (周期单位天 0不限)</label>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-form-item layui-row layui-hide">
|
||
<div class="layui-inline layui-col-md1">
|
||
<label class="layui-form-label">初始销量</label>
|
||
<div class="layui-input-block">
|
||
<input type="text" name="item[init_amount]" placeholder="请输入商品初始销量" class="layui-input"
|
||
value="{$item['init_amount'] ?? 0}">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-form-item">
|
||
<div class="layui-inline">
|
||
<label class="layui-form-label required">商品状态</label>
|
||
<div class="layui-input-block">
|
||
{foreach $statusList as $status => $name}
|
||
<input type="radio" name="item[saleable]" class="layui-input" value="{$status}"
|
||
title="{$name}" {if $status== $item['saleable']} checked {/if}>
|
||
{/foreach}
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-inline layui-hide">
|
||
<label class="layui-form-label">推荐至热门</label>
|
||
<div class="layui-input-block">
|
||
<input type="radio" name="item[is_hot]" class="layui-input" value="1"
|
||
title="是" {if $item.is_hot == 1} checked {/if}>
|
||
<input type="radio" name="item[is_hot]" class="layui-input" value="0"
|
||
title="否" {if $item.is_hot == 0} checked {/if}>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-form-item layui-hide">
|
||
<div class="layui-inline">
|
||
<label class="layui-form-label">包邮</label>
|
||
<div class="layui-input-block">
|
||
<input type="radio" name="item[has_postage]" class="layui-input" value="0"
|
||
title="是" {if $item.has_postage == 0} checked {/if}>
|
||
<input type="radio" name="item[has_postage]" class="layui-input" value="1"
|
||
title="否" {if $item.has_postage == 1} checked {/if}>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-inline ">
|
||
<label class="layui-form-label">商品属性</label>
|
||
<div class="layui-input-block">
|
||
{foreach $spuTypeList as $key => $val}
|
||
<input type="radio" name="item[spu_type]" class="layui-input" value="{$key}"
|
||
title="{$val}" {if $key== $item['spu_type']} checked {/if}>
|
||
{/foreach}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-form-item">
|
||
<div class="layui-inline">
|
||
<label class="layui-form-label">首页推荐</label>
|
||
<div class="layui-input-block">
|
||
<input type="radio" name="item[is_home]" class="layui-input" value="1"
|
||
title="是" {if $item.is_home == 1} checked {/if}>
|
||
<input type="radio" name="item[is_home]" class="layui-input" value="0"
|
||
title="否" {if $item.is_home == 0} checked {/if}>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-inline layui-hide">
|
||
<label class="layui-form-label">首页展示</label>
|
||
<div class="layui-input-block">
|
||
<input type="radio" name="item[home_display]" class="layui-input" value="big"
|
||
title="大图" {if $item.home_display == 'big'} checked {/if}>
|
||
<input type="radio" name="item[home_display]" class="layui-input" value="normal"
|
||
title="小图" {if $item.home_display == 'normal'} checked {/if}>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-form-item">
|
||
<!-- <div class="layui-inline">-->
|
||
<!-- <label class="layui-form-label required">核验方式</label>-->
|
||
<!-- <div class="layui-input-block">-->
|
||
<!-- <input type="radio" name="item[check_type]" class="layui-input" value="frontend" title="前端核验" {if 'frontend' == $item['check_type']} checked {/if}>-->
|
||
<!-- <input type="radio" name="item[check_type]" class="layui-input" value="backend" title="后台核验" {if 'backend' == $item['check_type']} checked {/if}>-->
|
||
<!-- </div>-->
|
||
<!-- </div>-->
|
||
<div class="layui-inline">
|
||
<label class="layui-form-label required">发布时间</label>
|
||
<div class="layui-input-block">
|
||
<input type="text" name="item[published_at]" class="layui-input"
|
||
value="{$item.published_at ?? ''}" id="published-at">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-form-item layui-row">
|
||
<label class="layui-form-label required">封面图</label>
|
||
<div class="layui-inline layui-col-xs12 layui-col-md8">
|
||
<div class="layui-row upload-file-div">
|
||
<div class=" layui-col-xs12 layui-col-md8">
|
||
<input class="layui-input upload-file-value" name="item[cover]" type="text" value="{$item.cover ?? ''}">
|
||
<div class="layui-form-mid layui-word-aux">图片尺寸:500px*500px</div>
|
||
</div>
|
||
<div class="layui-col-xs12 layui-col-md3">
|
||
<span>
|
||
<button type="button" class="layui-btn layui-btn-danger upload-btn">
|
||
<i class="fa fa-upload"></i> 上传
|
||
</button>
|
||
</span>
|
||
<span>
|
||
<button type="button" class="layui-btn layui-btn-primary upload-choose-btn"
|
||
data-type="image" data-multiple="false"><i
|
||
class="fa fa-list"></i> 选择
|
||
</button>
|
||
</span>
|
||
</div>
|
||
<ul class="layui-row layui-col-xs12 layui-col-md9 preview-list layui-col-space5"></ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-form-item layui-row">
|
||
<label class="layui-form-label required">轮播图</label>
|
||
<div class="layui-inline layui-col-xs12 layui-col-md8">
|
||
<div class="layui-row upload-file-div">
|
||
<div class=" layui-col-xs12 layui-col-md8">
|
||
<input class="layui-input upload-file-value" name="item[images]" type="text"
|
||
value="{$item.images ?? ''}">
|
||
<div class="layui-form-mid layui-word-aux">图片尺寸:500px*500px</div>
|
||
</div>
|
||
|
||
<div class="layui-col-xs12 layui-col-md3">
|
||
<span>
|
||
<button type="button" class="layui-btn layui-btn-danger upload-btn" data-multiple="true">
|
||
<i class="fa fa-upload"></i> 上传
|
||
</button>
|
||
</span>
|
||
<span>
|
||
<button type="button" class="layui-btn layui-btn-primary upload-choose-btn"
|
||
data-type="image" data-multiple="true"><i
|
||
class="fa fa-list"></i> 选择
|
||
</button>
|
||
</span>
|
||
</div>
|
||
<ul class="layui-row layui-col-xs12 layui-col-md9 preview-list layui-col-space5"></ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-form-item layui-row layui-hide">
|
||
<label class="layui-form-label required">视频上传</label>
|
||
<div class="layui-inline layui-col-xs12 layui-col-md8">
|
||
<div class="layui-row upload-file-div">
|
||
<div class=" layui-col-xs12 layui-col-md8">
|
||
<input class="layui-input upload-file-value" name="item[video]" type="text" value="{$item.video ?? ''}">
|
||
</div>
|
||
<div class="layui-col-xs12 layui-col-md3">
|
||
<span>
|
||
<button type="button" class="layui-btn layui-btn-danger upload-btn" data-url="/manager/upload/video" data-field="video_video"
|
||
data-accept="video" data-mimetype="video/*" data-exts="mp4|ogv|webm">
|
||
<i class="fa fa-upload"></i> 上传
|
||
</button>
|
||
</span>
|
||
<span>
|
||
<button type="button" class="layui-btn layui-btn-primary upload-choose-btn"
|
||
data-url="/manager/attachment/video" data-type="video" data-multiple="false"><i
|
||
class="fa fa-list"></i> 选择
|
||
</button>
|
||
</span>
|
||
</div>
|
||
<ul class="layui-row layui-col-xs12 layui-col-md9 preview-list layui-col-space5"></ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- 规格参数 -->
|
||
<div class="layui-tab-item">
|
||
<!--商品规格选项-->
|
||
<div id="fairy-is-attribute"></div>
|
||
<!--商品类型选择-->
|
||
<div id="fairy-product-type"></div>
|
||
<!--商品属性表-->
|
||
<!-- <div id="fairy-attribute-table"></div>-->
|
||
<!--商品规格表-->
|
||
<div id="fairy-spec-table" ></div>
|
||
<!--商品库存表-->
|
||
<div id="fairy-sku-table" data-id="{$id}" data-type="{$item['spu_type_id'] ?? 0}" data-multi="{$item['multi_spec']}"></div>
|
||
|
||
<!-- <div class="layui-form-item">-->
|
||
<!-- <div class="layui-input-block">-->
|
||
<!-- <button class="layui-btn" lay-submit lay-filter="submit">立即提交</button>-->
|
||
<!-- <button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
|
||
<!-- </div>-->
|
||
<!-- </div>-->
|
||
</div>
|
||
|
||
<!-- 商品详情 -->
|
||
<div class="layui-tab-item">
|
||
<div class="layui-form-item field-div">
|
||
<label class="layui-form-label required">商品详情</label>
|
||
<div class="layui-input-block editor-text">
|
||
<div class="editor"></div>
|
||
<textarea name="item[content]" class="layui-textarea layui-hide" >{$item.content ?? ''}</textarea>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="pad-15">
|
||
<div class="layui-form-item">
|
||
<div class="layui-input-block">
|
||
<input type="hidden" id="item-id" name="id" value="{$item.id ?? 0}">
|
||
<input type="hidden" id="is-score" value="{$isScore ?? 0}">
|
||
<button class="layui-btn layui-btn-normal" data-url="/manager/mall/spu/edit" lay-submit lay-filter="saveBtn">确认保存</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<script src="__MANAGER__/js/mall/spu.js?v={:mt_rand()}"></script>
|
||
<script src="__MANAGER__/js/mall/sku.js?v={:mt_rand()}"></script> |