This commit is contained in:
parent
dd80a961ae
commit
9a771acc77
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
|
||||
namespace app\admin\controller;
|
||||
use app\admin\logic\{GoodsBrandLogic, GoodsCategoryLogic, GoodsLogic, SupplierLogic,FreightLogic,CommonLogic};
|
||||
use app\admin\logic\{GoodsBrandLogic, GoodsCategoryLogic, GoodsLogic, SupplierLogic,FreightLogic,CommonLogic,ScreenSizeLogic,ScreenMudLogic};
|
||||
use think\Db;
|
||||
|
||||
class Goods extends AdminBase
|
||||
|
|
@ -137,6 +137,8 @@ class Goods extends AdminBase
|
|||
$this->assign('brand_lists',json_encode(GoodsBrandLogic::getGoodsBrandList(),JSON_UNESCAPED_UNICODE));
|
||||
$this->assign('supplier_lists',json_encode(SupplierLogic::getSupplierList(),JSON_UNESCAPED_UNICODE));
|
||||
$this->assign('freight_lists',json_encode(FreightLogic::getFreightList(),JSON_UNESCAPED_UNICODE));
|
||||
$this->assign('mud_lists',json_encode(ScreenMudLogic::getScreenMudList(),JSON_UNESCAPED_UNICODE));
|
||||
$this->assign('size_lists',json_encode(ScreenSizeLogic::getScreenSizeList(),JSON_UNESCAPED_UNICODE));
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
|
|
@ -229,6 +231,8 @@ class Goods extends AdminBase
|
|||
$this->assign('brand_lists',json_encode(GoodsBrandLogic::getGoodsBrandList(),JSON_UNESCAPED_UNICODE));
|
||||
$this->assign('supplier_lists',json_encode(SupplierLogic::getSupplierList(),JSON_UNESCAPED_UNICODE));
|
||||
$this->assign('freight_lists',json_encode(FreightLogic::getFreightList(),JSON_UNESCAPED_UNICODE));
|
||||
$this->assign('mud_lists',json_encode(ScreenMudLogic::getScreenMudList(),JSON_UNESCAPED_UNICODE));
|
||||
$this->assign('size_lists',json_encode(ScreenSizeLogic::getScreenSizeList(),JSON_UNESCAPED_UNICODE));
|
||||
return $this->fetch('goods/add');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class CommonLogic{
|
|||
public static function changeTableValue($table,$pk_name,$pk_value,$field,$field_value){
|
||||
//允许修改的字段
|
||||
$allow_field = [
|
||||
'is_show','sort','status','is_new','is_best','is_like','is_recommend'
|
||||
'is_show','sort','status','is_new','is_best','is_like','is_recommend','is_jiantreasure','is_zdtreasure'
|
||||
];
|
||||
if(!in_array($field,$allow_field)){
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -247,14 +247,11 @@ class GoodsLogic
|
|||
'name' => $post['name'],
|
||||
'code' => $post['code'],
|
||||
'first_category_id' => $post['first_category_id'],
|
||||
'second_category_id' => $post['second_category_id'],
|
||||
'third_category_id' => $post['third_category_id'],
|
||||
'brand_id' => $post['brand_id'],
|
||||
'supplier_id' => $post['supplier_id'],
|
||||
'image' => $post['image'],
|
||||
'video' => $video,
|
||||
'poster' => $post['poster'] ?? '',
|
||||
'remark' => $post['remark'],
|
||||
'content' => $post['content'],
|
||||
'max_price' => $max_price,
|
||||
'min_price' => $min_price,
|
||||
|
|
@ -267,22 +264,18 @@ class GoodsLogic
|
|||
'free_shipping_type' => $post['free_shipping_type'],
|
||||
'free_shipping' => $free_shipping,
|
||||
'free_shipping_template_id' => $free_shipping_template_id,
|
||||
'is_commission' => $post['is_commission'],
|
||||
'first_ratio' => $post['first_ratio'],
|
||||
'second_ratio' => $post['second_ratio'],
|
||||
'three_ratio' => $post['three_ratio'],
|
||||
'is_new' => isset($post['is_new']) && $post['is_new'] == 'on' ? 1 : 0,
|
||||
'is_best' => isset($post['is_best']) && $post['is_best'] == 'on' ? 1 : 0,
|
||||
'is_like' => isset($post['is_like']) && $post['is_like'] == 'on' ? 1 : 0,
|
||||
// 'is_share_bouns' => $post['is_share_bouns'],
|
||||
// 'region_ratio' => $post['region_ratio'],
|
||||
// 'shareholder_ratio' => $post['shareholder_ratio'],
|
||||
'is_integral' => $post['is_integral'],
|
||||
'is_member' => $post['is_member'],
|
||||
'give_integral_type' => $give_integral_type,
|
||||
'give_integral' => $give_integral,
|
||||
'spec_type' => $post['spec_type'],
|
||||
'create_time' => $time
|
||||
'create_time' => $time,
|
||||
'size_id' => $post['size_id'],
|
||||
'mud_id' => $post['mud_id'],
|
||||
'rongliang_name' => $post['rongliang_name'],
|
||||
'is_jiantreasure' => isset($post['is_jiantreasure']) && $post['is_jiantreasure'] == 'on' ? 1 : 0,
|
||||
'is_zdtreasure' => isset($post['is_zdtreasure']) && $post['is_zdtreasure'] == 'on' ? 1 : 0
|
||||
];
|
||||
$goods_id = Db::name('goods')->insertGetId($data);
|
||||
|
||||
|
|
@ -441,14 +434,11 @@ class GoodsLogic
|
|||
'name' => $post['name'],
|
||||
'code' => $post['code'],
|
||||
'first_category_id' => $post['first_category_id'],
|
||||
'second_category_id' => $post['second_category_id'],
|
||||
'third_category_id' => $post['third_category_id'],
|
||||
'brand_id' => $post['brand_id'],
|
||||
'supplier_id' => $post['supplier_id'],
|
||||
'image' => $post['image'],
|
||||
'video' => $video,
|
||||
'poster' => $post['poster'] ?? '',
|
||||
'remark' => $post['remark'],
|
||||
'content' => $post['content'],
|
||||
'max_price' => $max_price,
|
||||
'min_price' => $min_price,
|
||||
|
|
@ -461,22 +451,18 @@ class GoodsLogic
|
|||
'free_shipping_type' => $post['free_shipping_type'],
|
||||
'free_shipping' => $free_shipping,
|
||||
'free_shipping_template_id' => $free_shipping_template_id,
|
||||
'is_commission' => $post['is_commission'],
|
||||
'first_ratio' => $post['first_ratio'],
|
||||
'second_ratio' => $post['second_ratio'],
|
||||
'three_ratio' => $post['three_ratio'],
|
||||
'is_new' => isset($post['is_new']) && $post['is_new'] == 'on' ? 1 : 0,
|
||||
'is_best' => isset($post['is_best']) && $post['is_best'] == 'on' ? 1 : 0,
|
||||
'is_like' => isset($post['is_like']) && $post['is_like'] == 'on' ? 1 : 0,
|
||||
// 'is_share_bouns' => $post['is_share_bouns'],
|
||||
// 'region_ratio' => $post['region_ratio'],
|
||||
// 'shareholder_ratio' => $post['shareholder_ratio'],
|
||||
'is_integral' => $post['is_integral'],
|
||||
'is_member' => $post['is_member'],
|
||||
'give_integral_type' => $give_integral_type,
|
||||
'give_integral' => $give_integral,
|
||||
'spec_type' => $post['spec_type'],
|
||||
'update_time' => $time
|
||||
'update_time' => $time,
|
||||
'size_id' => $post['size_id'],
|
||||
'mud_id' => $post['mud_id'],
|
||||
'rongliang_name' => $post['rongliang_name'],
|
||||
'is_jiantreasure' => isset($post['is_jiantreasure']) && $post['is_jiantreasure'] == 'on' ? 1 : 0,
|
||||
'is_zdtreasure' => isset($post['is_zdtreasure']) && $post['is_zdtreasure'] == 'on' ? 1 : 0
|
||||
];
|
||||
|
||||
Db::name('goods')
|
||||
|
|
@ -783,18 +769,9 @@ class GoodsLogic
|
|||
*/
|
||||
public static function getCateName($cates, $item)
|
||||
{
|
||||
if(isset($cates[$item['third_category_id']])) {
|
||||
return $cates[$item['third_category_id']];
|
||||
}
|
||||
|
||||
if(isset($cates[$item['second_category_id']])) {
|
||||
return $cates[$item['second_category_id']];
|
||||
}
|
||||
|
||||
if(isset($cates[$item['first_category_id']])) {
|
||||
return $cates[$item['first_category_id']];
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
|
@ -107,4 +107,9 @@ class ScreenCapacityLogic
|
|||
];
|
||||
return Db::name('screen_capacity')->where(['del' => 0, 'id' => $post['id']])->update($data);
|
||||
}
|
||||
|
||||
//获取容量列表
|
||||
public static function getScreenCapacityList(){
|
||||
return Db::name('screen_capacity')->where(['del'=>0])->field('id,name')->select();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,4 +103,9 @@ class ScreenMudLogic
|
|||
];
|
||||
return Db::name('screen_mud')->where(['del' => 0, 'id' => $post['id']])->update($data);
|
||||
}
|
||||
|
||||
//获取泥料列表
|
||||
public static function getScreenMudList(){
|
||||
return Db::name('screen_mud')->where(['del'=>0])->field('id,name')->select();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,4 +103,9 @@ class ScreenSizeLogic
|
|||
];
|
||||
return Db::name('screen_size')->where(['del' => 0, 'id' => $post['id']])->update($data);
|
||||
}
|
||||
|
||||
//获取尺寸列表
|
||||
public static function getScreenSizeList(){
|
||||
return Db::name('screen_size')->where(['del'=>0])->field('id,name')->select();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
<li class="goods-tab" style="color: #6a6f6c">价格库存</li>
|
||||
<li class="goods-tab" style="color: #6a6f6c">商品详情</li>
|
||||
<li class="goods-tab" style="color: #6a6f6c">销售设置</li>
|
||||
<li class="goods-tab" style="color: #6a6f6c">分销设置</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content layui-form">
|
||||
<div class="layui-tab-item goods-content layui-show">
|
||||
|
|
@ -22,12 +21,6 @@
|
|||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">商品编码:</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="code" lay-verType="tips" autocomplete="off" switch-tab="0" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"><span class="form-label-asterisk">*</span>商品分类:</label>
|
||||
<div class="layui-input-inline">
|
||||
|
|
@ -36,21 +29,11 @@
|
|||
<option value="">请选择分类</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<select name="second_category_id" lay-filter="second_category">
|
||||
<option value="">请选择分类</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<select name="third_category_id" lay-filter="third_category">
|
||||
<option value="">请选择分类</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">商品卖点:</label>
|
||||
<label class="layui-form-label"><span class="form-label-asterisk">*</span>商品编码:</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" maxlength="32" name="remark" autocomplete="off" class="layui-input">
|
||||
<input type="text" name="code" lay-verType="tips" autocomplete="off" switch-tab="0" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" style="margin-bottom: 0px">
|
||||
|
|
@ -75,42 +58,44 @@
|
|||
<div class="layui-form-item"><label class="layui-form-label"></label><span
|
||||
style="color: #a3a3a3;font-size: 9px">建议尺寸:800*800像素,你可以拖拽图片调整顺序,最多上传8张</span></div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">商品视频:</label>
|
||||
<div class="upload-file-div video-style" id="video">
|
||||
<a href="#" class="upload-file-title">+添加视频</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item"><label class="layui-form-label"></label><span
|
||||
style="color: #a3a3a3;font-size: 9px">手机端播放,建议时长9-30秒,建议视频宽高比16:9</span></div>
|
||||
|
||||
<div class="layui-form-item" style="margin-bottom: 0px">
|
||||
<label class="layui-form-label">自定义分享海报:</label>
|
||||
<div style="height:80px;line-height:80px">
|
||||
<div class="poster-image" ></div>
|
||||
<div class="goods-img-add poster-upload" lay-verify="image" lay-verType="tips" switch-tab="0" verify-msg="选择图片"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item"><label class="layui-form-label"></label><span
|
||||
style="color: #a3a3a3;font-size: 9px">自定义商品分享的海报图,留空则默认使用商品封面图,建议尺寸:800*800像素</span></div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">商品品牌:</label>
|
||||
<label class="layui-form-label"><span class="form-label-asterisk">*</span>壶类型:</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="brand_id" lay-verType="tips" switch-tab="0" verify-msg="请选择商品品牌">
|
||||
<option value="">请选择品牌</option>
|
||||
<select name="brand_id" lay-verType="tips" switch-tab="0" verify-msg="请选择壶类型">
|
||||
<option value="">请选择壶类型</option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">供货商:</label>
|
||||
<label class="layui-form-label"><span class="form-label-asterisk">*</span>专家:</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="supplier_id" lay-verType="tips" switch-tab="0" verify-msg="请选择供货商">
|
||||
<option value="">请选择供货商</option>
|
||||
<select name="supplier_id" lay-verType="tips" switch-tab="0" verify-msg="请选择专家">
|
||||
<option value="">请选择专家</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"><span class="form-label-asterisk">*</span>尺寸:</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="size_id" lay-verType="tips" switch-tab="0" verify-msg="请选择尺寸">
|
||||
<option value="">请选择尺寸</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"><span class="form-label-asterisk">*</span>泥料:</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="mud_id" lay-verType="tips" switch-tab="0" verify-msg="请选择泥料">
|
||||
<option value="">请选择泥料</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"><span class="form-label-asterisk">*</span>容量:</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="rongliang_name" lay-verType="tips" autocomplete="off" switch-tab="0" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -275,64 +260,14 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
<!--积分抵扣-start-->
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">积分抵扣:</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="is_integral" value="1" title="允许积分抵扣" >
|
||||
<input type="radio" name="is_integral" value="0" title="不能使用积分抵扣" checked>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"></label>
|
||||
<span style="color: #a3a3a3;font-size: 9px">默认不参与积分抵扣</span>
|
||||
</div>
|
||||
<!--积分抵扣-end-->
|
||||
<!--赠送积分-start-->
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">赠送积分:</label>
|
||||
<div class="layui-input-inline" style="margin-right: 0px;width: auto">
|
||||
<input type="radio" name="give_integral_type" value="1" title="赠送固定积分">
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="give_integral_num" class="layui-input time" autocomplete="off">
|
||||
</div>
|
||||
<div class="unit-tips">积分</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"></label>
|
||||
<div class="layui-input-inline" style="margin-right: 0px;width: auto">
|
||||
<input type="radio" name="give_integral_type" value="2" title="按比例赠送积分">
|
||||
</div>
|
||||
<div class="layui-input-inline" style="width:auto">
|
||||
<input type="number" min="0" name="give_integral_ratio" class="layui-input">
|
||||
</div>
|
||||
<div class="unit-tips">%</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"></label>
|
||||
<span style="color: #a3a3a3;font-size: 9px">按商品金额的比例赠送积分</span>
|
||||
</div>
|
||||
<!--赠送积分-end-->
|
||||
<!--会员价-start-->
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">会员价:</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="is_member" value="0" title="不参与会员价" checked>
|
||||
<input type="radio" name="is_member" value="1" title="根据会员等级折扣计算会员价" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"></label>
|
||||
<span style="color: #a3a3a3;font-size: 9px">根据会员等级设置的会员折扣自动打折,拼团和秒杀等营销活动不参与会员折扣</span>
|
||||
</div>
|
||||
<!--会员价-end-->
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">商品标签:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="checkbox" name="is_new" lay-skin="primary" title="新品推荐">
|
||||
<input type="checkbox" name="is_best" lay-skin="primary" title="好物优选">
|
||||
<input type="checkbox" name="is_like" lay-skin="primary" title="猜你喜欢">
|
||||
<input type="checkbox" name="is_new" lay-skin="primary" title="新品上架">
|
||||
<input type="checkbox" name="is_best" lay-skin="primary" title="精品推荐">
|
||||
<input type="checkbox" name="is_like" lay-skin="primary" title="今日促销">
|
||||
<input type="checkbox" name="is_jiantreasure" lay-skin="primary" title="藏品捡宝">
|
||||
<input type="checkbox" name="is_zdtreasure" lay-skin="primary" title="镇店藏品">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
|
|
@ -343,35 +278,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-tab-item">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">分销佣金:</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="is_commission" value="1" title="开启" checked>
|
||||
<input type="radio" name="is_commission" value="0" title="不开启" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item"><label class="layui-form-label"></label><span
|
||||
style="color: #a3a3a3;font-size: 9px">开启后商品可以参与分销佣金</span></div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">一级分销比例:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="first_ratio" autocomplete="off" class="layui-input first_ratio">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">二级分销比例:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="second_ratio" autocomplete="off" class="layui-input second_ratio">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">三级分销比例:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="three_ratio" lay-verify="distribution" autocomplete="off" class="layui-input three_ratio">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-hide">
|
||||
<input type="button" lay-submit lay-filter="goods-submit" id="goods-submit" value="确认">
|
||||
</div>
|
||||
|
|
@ -505,23 +411,6 @@
|
|||
format(that,value)
|
||||
|
||||
});
|
||||
//格式化分销比例
|
||||
function format(that,value){
|
||||
value = value.replace(/[^0-9.]/g,'');
|
||||
|
||||
value = value.replace(/\.{2,}/g,".");
|
||||
value = value.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
|
||||
|
||||
value = value.replace(/^(\-)*(\d+)\.(\d)(\d).*$/,'$1$2.$3$4');
|
||||
if(value.indexOf(".")< 0 && value !=""){
|
||||
value= parseFloat(value);
|
||||
}
|
||||
if(value > 100){
|
||||
that.val(100);
|
||||
return false;
|
||||
}
|
||||
that.val(value);
|
||||
}
|
||||
|
||||
|
||||
//------------------------基本信息----------------------------------
|
||||
|
|
@ -548,18 +437,6 @@
|
|||
like.showImg(src,600);
|
||||
});
|
||||
|
||||
//分享海报删除按钮
|
||||
$(document).on('mouseenter','.poster-image',function () {
|
||||
|
||||
$(this).children('.goods-image-del').show();
|
||||
})
|
||||
$(document).on('mouseleave', '.poster-image', function () {
|
||||
$(this).children('.goods-image-del').hide();
|
||||
});
|
||||
$(document).on('click', '.poster-image', function () {
|
||||
var src = $(this).children('img').attr('src');
|
||||
like.showImg(src,600);
|
||||
});
|
||||
|
||||
$(document).on('click', '.goods-img-del-x', function () {
|
||||
|
||||
|
|
@ -614,20 +491,6 @@
|
|||
}
|
||||
}, true);
|
||||
|
||||
// ========= 视频上传 开始
|
||||
$('#video').click(function(){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '上传视频',
|
||||
content: '{:url("file_new/lists")}?type=video',
|
||||
area: ['90%', '90%']
|
||||
});
|
||||
});
|
||||
|
||||
window.videoCallback = function(uris) {
|
||||
like.videoCallback(uris);
|
||||
};
|
||||
// ========== 视频上传 结束
|
||||
|
||||
//图片拉拽
|
||||
$(document).on('dragstart', '.goods-li', function (e) {
|
||||
|
|
@ -654,12 +517,12 @@
|
|||
swop($(this), $(this).parent().children().eq(swop_element));
|
||||
});
|
||||
|
||||
//渲染品牌
|
||||
//渲染壶类型
|
||||
var brands = {$brand_lists | raw};
|
||||
|
||||
setBrand();
|
||||
function setBrand(default_id) {
|
||||
var brand_select_html = '<option value="">请选择品牌</option>';
|
||||
var brand_select_html = '<option value="">请选择壶类型</option>';
|
||||
for (var i in brands) {
|
||||
brand_select_html += '<option value="' + brands[i]['id'] + '">' + brands[i]['name'] + '</option>';
|
||||
}
|
||||
|
|
@ -668,11 +531,11 @@
|
|||
form.render('select');
|
||||
}
|
||||
|
||||
//渲染供应商
|
||||
//渲染专家
|
||||
var supplier = {$supplier_lists | raw};
|
||||
setSupplier();
|
||||
function setSupplier(default_id) {
|
||||
var supplier_select_html = '<option value="">请选择供应商</option>';
|
||||
var supplier_select_html = '<option value="">请选择专家</option>';
|
||||
for (var i in supplier) {
|
||||
supplier_select_html += '<option value="' + supplier[i]['id'] + '">' + supplier[i]['name'] + '</option>';
|
||||
}
|
||||
|
|
@ -680,6 +543,35 @@
|
|||
$('select[name="supplier_id"]').val(default_id);
|
||||
form.render('select');
|
||||
}
|
||||
|
||||
//渲染尺寸
|
||||
var sizes = {$size_lists | raw};
|
||||
|
||||
setSizes();
|
||||
function setSizes(default_id) {
|
||||
var sizes_select_html = '<option value="">请选择尺寸</option>';
|
||||
for (var i in sizes) {
|
||||
sizes_select_html += '<option value="' + sizes[i]['id'] + '">' + sizes[i]['name'] + '</option>';
|
||||
}
|
||||
$('select[name="size_id"]').html(sizes_select_html);
|
||||
$('select[name="size_id"]').val(default_id);
|
||||
form.render('select');
|
||||
}
|
||||
|
||||
//渲染泥料
|
||||
var muds = {$mud_lists | raw};
|
||||
|
||||
setMuds();
|
||||
function setMuds(default_id) {
|
||||
var muds_select_html = '<option value="">请选择泥料</option>';
|
||||
for (var i in muds) {
|
||||
muds_select_html += '<option value="' + muds[i]['id'] + '">' + muds[i]['name'] + '</option>';
|
||||
}
|
||||
$('select[name="mud_id"]').html(muds_select_html);
|
||||
$('select[name="mud_id"]').val(default_id);
|
||||
form.render('select');
|
||||
}
|
||||
|
||||
//渲染运费模板
|
||||
var freight_template = {$freight_lists | raw};
|
||||
setFreightTemplate();
|
||||
|
|
@ -700,7 +592,6 @@
|
|||
|
||||
setSelectFirst();
|
||||
|
||||
|
||||
function setSelectFirst(default_id) {
|
||||
var category_select_html = '<option value="">请选择分类</option>';
|
||||
for (var i in categorys) {
|
||||
|
|
@ -712,41 +603,6 @@
|
|||
$('select[name="first_category_id"]').val(default_id);
|
||||
form.render('select');
|
||||
}
|
||||
function setSelectSecond(default_id, pid) {
|
||||
pid = pid === undefined ? $('select[name="first_category_id"]').val() : pid;
|
||||
$('select[name="second_category_id"]').html('<option value="">请选择分类</option>');
|
||||
$('select[name="third_category_id"]').html('<option value="">请选择分类</option>');
|
||||
var category_select_html = '<option value="">请选择分类</option>';
|
||||
for (var i in categorys) {
|
||||
if (categorys[i]['pid'] == pid) {
|
||||
category_select_html += '<option value="' + categorys[i]['id'] + '">' + categorys[i]['name'] + '</option>';
|
||||
}
|
||||
}
|
||||
$('select[name="second_category_id"]').html(category_select_html);
|
||||
$('select[name="second_category_id"]').val(default_id);
|
||||
form.render('select');
|
||||
}
|
||||
function setSelectThird(default_id, pid) {
|
||||
pid = pid === undefined ? $('select[name="second_category_id"]').val() : pid;
|
||||
$('select[name="third_category_id"]').html('<option value="">请选择分类</option>');
|
||||
var first_category_id = $('select[name="first_category_id"]').val();
|
||||
var category_select_html = '<option value="">请选择分类</option>';
|
||||
for (var i in categorys) {
|
||||
if (categorys[i]['pid'] == pid) {
|
||||
category_select_html += '<option value="' + categorys[i]['id'] + '">' + categorys[i]['name'] + '</option>';
|
||||
}
|
||||
}
|
||||
$('select[name="third_category_id"]').html(category_select_html);
|
||||
$('select[name="third_category_id"]').val(default_id);
|
||||
form.render('select');
|
||||
}
|
||||
|
||||
form.on('select(first_category)', function (data) {
|
||||
setSelectSecond('', data.value);
|
||||
});
|
||||
form.on('select(second_category)', function (data) {
|
||||
setSelectThird('', data.value);
|
||||
});
|
||||
|
||||
|
||||
//------------------------价格库存----------------------------------
|
||||
|
|
@ -1219,14 +1075,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
// one_market_price: function (value, item) {
|
||||
// if ($('input[name="spec_type"]:checked').val() == 1) {
|
||||
// if (value && value < 0.01) {
|
||||
// switchTab($(item).attr('switch-tab'));
|
||||
// return '市场价必须大于或等于0.01';
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
one_price: function (value, item) {
|
||||
if ($('input[name="spec_type"]:checked').val() == 2) {
|
||||
if (value && value < 0.01) {
|
||||
|
|
@ -1259,14 +1107,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
// more_market_price:function (value, item) {
|
||||
// if ($('input[name="spec_type"]:checked').val() == 2) {
|
||||
// if (value && value < 0.01) {
|
||||
// switchTab($(item).attr('switch-tab'));
|
||||
// return '市场价必须大于或等于0.01';
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
more_stock: function (value, item) {
|
||||
if ($('input[name="spec_type"]:checked').val() == 2) {
|
||||
if (value && value < 0) {
|
||||
|
|
@ -1314,15 +1154,6 @@
|
|||
return '同一规格中,规格值不能重复';
|
||||
}
|
||||
}
|
||||
},
|
||||
distribution:function (value,item) {
|
||||
var first_ratio = parseFloat($('.first_ratio').val());
|
||||
var second_ratio = parseFloat($('.second_ratio').val());
|
||||
var three_ratio = parseFloat(value);
|
||||
if(first_ratio + second_ratio + three_ratio > 100){
|
||||
return '分销比例不可超过100';
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
//------------------------数据验证----------------------------------
|
||||
|
|
@ -1335,12 +1166,13 @@
|
|||
$('input[name="goods_id"]').val(goods_info['base']['id']);
|
||||
$('input[name="name"]').val(goods_info['base']['name']);
|
||||
$('input[name="code"]').val(goods_info['base']['code']);
|
||||
$('input[name="rongliang_name"]').val(goods_info['base']['rongliang_name']);
|
||||
|
||||
setSelectFirst(goods_info['base']['first_category_id']);
|
||||
setSelectSecond(goods_info['base']['second_category_id']);
|
||||
setSelectThird(goods_info['base']['third_category_id']);
|
||||
setBrand(goods_info['base']['brand_id']); //渲染品牌
|
||||
setSupplier(goods_info['base']['supplier_id']); //渲染品供应商
|
||||
setBrand(goods_info['base']['brand_id']); //渲染壶类型
|
||||
setSupplier(goods_info['base']['supplier_id']); //渲染专家
|
||||
setSizes(goods_info['base']['size_id']); //渲染尺寸
|
||||
setMuds(goods_info['base']['mud_id']); //渲染泥料
|
||||
setFreightTemplate(goods_info['base']['free_shipping_template_id']); //渲染运费模板
|
||||
$('input[name="remark"]').val(goods_info['base']['remark']);
|
||||
|
||||
|
|
@ -1385,22 +1217,7 @@
|
|||
$("input[name=free_shipping_type][value="+goods_info['base']['free_shipping_type']+"]").prop("checked",true); //快递运费类型
|
||||
$('input[name="free_shipping"]').val(goods_info['base']['free_shipping']); //运费
|
||||
|
||||
$("input[name=is_commission][value="+goods_info['base']['is_commission']+"]").prop("checked",true); //分销设置
|
||||
$("input[name=is_share_bouns][value="+goods_info['base']['is_share_bouns']+"]").prop("checked",true); //区域股东分红
|
||||
$('input[name="first_ratio"]').val(goods_info['base']['first_ratio']); //一级分销
|
||||
$('input[name="second_ratio"]').val(goods_info['base']['second_ratio']); //二级分销
|
||||
$('input[name="three_ratio"]').val(goods_info['base']['three_ratio']); //三级分销
|
||||
$('input[name="region_ratio"]').val(goods_info['base']['region_ratio']); //区域股东分红
|
||||
$('input[name="shareholder_ratio"]').val(goods_info['base']['shareholder_ratio']); //股东分红
|
||||
|
||||
$("input[name=is_integral][value="+goods_info['base']['is_integral']+"]").prop("checked",true); //积分抵扣
|
||||
$("input[name=is_member][value="+goods_info['base']['is_member']+"]").prop("checked",true); //会员价是否开启
|
||||
$("input[name=give_integral_type][value="+goods_info['base']['give_integral_type']+"]").prop("checked",true); //赠送积分类型
|
||||
if(1 === goods_info['base']['give_integral_type']){
|
||||
$("input[name=give_integral_num]").val(goods_info['base']['give_integral']); //赠送积分
|
||||
}else if(2 === goods_info['base']['give_integral_type']){
|
||||
$("input[name=give_integral_ratio]").val(goods_info['base']['give_integral']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//渲染商品标签
|
||||
|
|
@ -1413,6 +1230,12 @@
|
|||
if(1 == goods_info['base']['is_like']){
|
||||
$("input[name=is_like]").prop("checked",true);
|
||||
}
|
||||
if(1 == goods_info['base']['is_jiantreasure']){
|
||||
$("input[name=is_jiantreasure]").prop("checked",true);
|
||||
}
|
||||
if(1 == goods_info['base']['is_zdtreasure']){
|
||||
$("input[name=is_zdtreasure]").prop("checked",true);
|
||||
}
|
||||
|
||||
form.render();
|
||||
switchSpecType(goods_info['base']['spec_type']);
|
||||
|
|
|
|||
|
|
@ -49,9 +49,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">商品供货商:</label>
|
||||
<label class="layui-form-label">专家:</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="supplier_id" id="supplier_id" placeholder="请选择商品供货商" >
|
||||
<select name="supplier_id" id="supplier_id" placeholder="请选择专家" >
|
||||
<option value="0">全部</option>
|
||||
{foreach $supplier_list as $val }
|
||||
<option value="{$val.id}">{$val.name}</option>
|
||||
|
|
@ -73,13 +73,6 @@
|
|||
<button id="upper" class="layui-btn layui-btn-sm layuiadmin-btn-goods {$view_theme_color}" data-type="upper" style="display: none;">上架</button>
|
||||
</div>
|
||||
<table id="goods-lists" lay-filter="goods-lists"></table>
|
||||
<script type="text/html" id="ratio">
|
||||
<p >一级佣金:{{d.first_ratio_desc}}</p>
|
||||
<p >二级佣金:{{d.second_ratio_desc}}</p>
|
||||
<p >三级佣金:{{d.three_ratio_desc}}</p>
|
||||
<!-- <p >股东分红比例:{{d.region_ratio_desc}}</p>-->
|
||||
<!-- <p >区域分红比例:{{d.shareholder_ratio_desc}}</p>-->
|
||||
</script>
|
||||
<script type="text/html" id="new">
|
||||
<input type="checkbox" lay-filter="switch-status" data-id={{d.id}} data-field='is_new' lay-skin="switch"
|
||||
lay-text="是|否" {{# if(d.is_new){ }} checked {{# } }} />
|
||||
|
|
@ -92,6 +85,14 @@
|
|||
<input type="checkbox" lay-filter="switch-status" data-id={{d.id}} data-field='is_like' lay-skin="switch"
|
||||
lay-text="是|否" {{# if(d.is_like){ }} checked {{# } }} />
|
||||
</script>
|
||||
<script type="text/html" id="jiantreasure">
|
||||
<input type="checkbox" lay-filter="switch-status" data-id={{d.id}} data-field='is_jiantreasure' lay-skin="switch"
|
||||
lay-text="是|否" {{# if(d.is_jiantreasure){ }} checked {{# } }} />
|
||||
</script>
|
||||
<script type="text/html" id="zdtreasure">
|
||||
<input type="checkbox" lay-filter="switch-status" data-id={{d.id}} data-field='is_zdtreasure' lay-skin="switch"
|
||||
lay-text="是|否" {{# if(d.is_zdtreasure){ }} checked {{# } }} />
|
||||
</script>
|
||||
<script type="text/html" id="goods-info">
|
||||
<img src="{{d.image}}" style="height:60px;width: 60px;margin-right: 5px;" class="image-show"> {{d.name}}
|
||||
</script>
|
||||
|
|
@ -491,14 +492,14 @@
|
|||
{type: 'checkbox'}
|
||||
,{field: 'name', title: '商品名称',width:320,toolbar: '#goods-info'}
|
||||
,{field: 'cat_name',width:160, title: '商品分类'}
|
||||
,{field: 'commission_status',width:160, title: '三级分销'}
|
||||
,{field: 'ratio',width:160, title: '分销比例',toolbar: '#ratio'}
|
||||
,{field: 'price',width:180,title: '价格'}
|
||||
,{field: 'stock',width: 100,title: '总库存'}
|
||||
,{field: 'total_sales_sum',width: 100,title: '总销量'}
|
||||
,{field: 'ratio',width:160, title: '新品推荐',toolbar: '#new'}
|
||||
,{field: 'ratio',width:160, title: '好物优选',toolbar: '#best'}
|
||||
,{field: 'ratio',width:160, title: '猜你喜欢',toolbar: '#like'}
|
||||
,{field: 'ratio',width:160, title: '新品上架',toolbar: '#new'}
|
||||
,{field: 'ratio',width:160, title: '精品推荐',toolbar: '#best'}
|
||||
,{field: 'ratio',width:160, title: '今日促销',toolbar: '#like'}
|
||||
,{field: 'ratio',width:160, title: '藏品捡宝',toolbar: '#jiantreasure'}
|
||||
,{field: 'ratio',width:160, title: '镇店藏品',toolbar: '#zdtreasure'}
|
||||
,{field: 'sort',width: 80, title:'排序',event: 'tips',edit:'text',sort: true}
|
||||
,{field: 'create_time_desc',width:160, title:'发布时间'}
|
||||
,{fixed: 'right', title: '操作', align: 'center', width:300, toolbar: '#goods-operation'}
|
||||
|
|
|
|||
|
|
@ -45,17 +45,7 @@
|
|||
<input type="text" name="name" lay-verify="required" lay-verType="tips" placeholder="请输入名称" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">父级分类:</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="pid" lay-verify="required" placeholder="请选择父级分类" lay-filter="search_pid">
|
||||
<option value="0" data-level="1">顶级分类</option>
|
||||
{foreach $category_list as $item => $val}
|
||||
<option value="{$item}" data-level={$val.level}>{$val.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" value="0" name="pid">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">分类图标:</label>
|
||||
<div class="layui-input-inline">
|
||||
|
|
@ -75,16 +65,12 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item is_recommend">
|
||||
<label class="layui-form-label">首页推荐:</label>
|
||||
<label class="layui-form-label">惠藏百件:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="radio" name="is_recommend" value="1" title="推荐" checked>
|
||||
<input type="radio" name="is_recommend" value="0" title="不推荐">
|
||||
<input type="radio" name="is_recommend" value="1" title="是" checked>
|
||||
<input type="radio" name="is_recommend" value="0" title="否">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item is_recommend">
|
||||
<label class="layui-form-label"></label>
|
||||
<span style="color: #a3a3a3;font-size: 9px">当前分类推荐在PC商城首页显示,默认推荐</span>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">显示状态:</label>
|
||||
<div class="layui-input-inline">
|
||||
|
|
|
|||
|
|
@ -40,23 +40,13 @@
|
|||
</style>
|
||||
<div class="layui-form" lay-filter="layuiadmin-form-category" id="layuiadmin-form-category" style="padding: 20px 30px 0 0;">
|
||||
<input type="hidden" value="{$info.id}" name="id">
|
||||
<input type="hidden" value="0" name="pid">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">名称:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="name" value="{$info.name}" lay-verify="required" lay-verType="tips" placeholder="请输入名称" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">父级分类:</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="pid" lay-verify="required" placeholder="请选择父级分类" lay-filter="search_pid">
|
||||
<option value="0" data-level="1">顶级分类</option>
|
||||
{foreach $category_list as $item => $val}
|
||||
<option value="{$item}"data-level={$val.level}{if $info.pid == $item} selected="selected" {/if}>{$val.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">分类图标:</label>
|
||||
<div class="layui-input-inline">
|
||||
|
|
@ -83,10 +73,10 @@
|
|||
</div>
|
||||
{if condition="$info['pid'] eq 0" }
|
||||
<div class="layui-form-item is_recommend">
|
||||
<label class="layui-form-label">首页推荐:</label>
|
||||
<label class="layui-form-label">惠藏百件:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="radio" name="is_recommend" value="1" title="推荐" {if condition="$info['is_recommend'] eq 1" }checked{/if}>
|
||||
<input type="radio" name="is_recommend" value="0" title="不推荐" {if condition="$info['is_recommend'] eq 0" }checked{/if}>
|
||||
<input type="radio" name="is_recommend" value="1" title="是" {if condition="$info['is_recommend'] eq 1" }checked{/if}>
|
||||
<input type="radio" name="is_recommend" value="0" title="否" {if condition="$info['is_recommend'] eq 0" }checked{/if}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item is_recommend">
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@
|
|||
<div class="layui-btn-container" style="display: inline-block;">
|
||||
<div class="layui-btn-group">
|
||||
<button class="layui-btn layui-btn-sm layui-btn-goods_category {$view_theme_color}" id="goods_category-add">添加</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-goods_category {$view_theme_color}" id="expand-all">全部展开</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-goods_category {$view_theme_color}" id="fold-all">全部折叠</button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" id="search-value" placeholder="请输入" autocomplete="off" class="layui-input" style="display: inline-block;width: 140px;padding: 0 5px;margin-right: 5px;">
|
||||
|
|
@ -38,9 +36,9 @@
|
|||
</script>
|
||||
<script type="text/html" id="is_recommend">
|
||||
{{# if(d.is_recommend == 1){ }}
|
||||
推荐
|
||||
是
|
||||
{{# }else{}}
|
||||
不推荐
|
||||
否
|
||||
{{#}}}
|
||||
</script>
|
||||
<!-- 表格操作列 -->
|
||||
|
|
@ -94,7 +92,7 @@
|
|||
cols: [
|
||||
{field: 'name', title: '分类名称',width: 280},
|
||||
{field: '#image', title: '分类图标', width: 120,style:'height:100px;',toolbar: '#image', align: 'center'},
|
||||
{templet: '#is_recommend', title: '首页推荐', width: 100,align: 'center'},
|
||||
{templet: '#is_recommend', title: '惠藏百件', width: 100,align: 'center'},
|
||||
{templet: '#is_show', title: '显示', width: 100},
|
||||
{field: 'sort', title: '排序', width: 80, align: 'center',event: 'tips',sort: true},
|
||||
{fixed: 'right', align: 'center', toolbar: '#goods_category-operation', title: '操作', width: 180}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php /*a:2:{s:90:"/Library/WebServer/Documents/dggxiangmu/dggzichahu/application/admin/view/goods/lists.html";i:1628618358;s:86:"/Library/WebServer/Documents/dggxiangmu/dggzichahu/application/admin/view/layout1.html";i:1628618358;}*/ ?>
|
||||
<?php /*a:2:{s:90:"/Library/WebServer/Documents/dggxiangmu/dggzichahu/application/admin/view/goods/lists.html";i:1640504870;s:86:"/Library/WebServer/Documents/dggxiangmu/dggzichahu/application/admin/view/layout1.html";i:1628618358;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
|
@ -67,9 +67,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">商品供货商:</label>
|
||||
<label class="layui-form-label">专家:</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="supplier_id" id="supplier_id" placeholder="请选择商品供货商" >
|
||||
<select name="supplier_id" id="supplier_id" placeholder="请选择专家" >
|
||||
<option value="0">全部</option>
|
||||
<?php foreach($supplier_list as $val): ?>
|
||||
<option value="<?php echo htmlentities($val['id']); ?>"><?php echo htmlentities($val['name']); ?></option>
|
||||
|
|
@ -91,13 +91,6 @@
|
|||
<button id="upper" class="layui-btn layui-btn-sm layuiadmin-btn-goods <?php echo htmlentities($view_theme_color); ?>" data-type="upper" style="display: none;">上架</button>
|
||||
</div>
|
||||
<table id="goods-lists" lay-filter="goods-lists"></table>
|
||||
<script type="text/html" id="ratio">
|
||||
<p >一级佣金:{{d.first_ratio_desc}}</p>
|
||||
<p >二级佣金:{{d.second_ratio_desc}}</p>
|
||||
<p >三级佣金:{{d.three_ratio_desc}}</p>
|
||||
<!-- <p >股东分红比例:{{d.region_ratio_desc}}</p>-->
|
||||
<!-- <p >区域分红比例:{{d.shareholder_ratio_desc}}</p>-->
|
||||
</script>
|
||||
<script type="text/html" id="new">
|
||||
<input type="checkbox" lay-filter="switch-status" data-id={{d.id}} data-field='is_new' lay-skin="switch"
|
||||
lay-text="是|否" {{# if(d.is_new){ }} checked {{# } }} />
|
||||
|
|
@ -110,6 +103,14 @@
|
|||
<input type="checkbox" lay-filter="switch-status" data-id={{d.id}} data-field='is_like' lay-skin="switch"
|
||||
lay-text="是|否" {{# if(d.is_like){ }} checked {{# } }} />
|
||||
</script>
|
||||
<script type="text/html" id="jiantreasure">
|
||||
<input type="checkbox" lay-filter="switch-status" data-id={{d.id}} data-field='is_jiantreasure' lay-skin="switch"
|
||||
lay-text="是|否" {{# if(d.is_jiantreasure){ }} checked {{# } }} />
|
||||
</script>
|
||||
<script type="text/html" id="zdtreasure">
|
||||
<input type="checkbox" lay-filter="switch-status" data-id={{d.id}} data-field='is_zdtreasure' lay-skin="switch"
|
||||
lay-text="是|否" {{# if(d.is_zdtreasure){ }} checked {{# } }} />
|
||||
</script>
|
||||
<script type="text/html" id="goods-info">
|
||||
<img src="{{d.image}}" style="height:60px;width: 60px;margin-right: 5px;" class="image-show"> {{d.name}}
|
||||
</script>
|
||||
|
|
@ -509,14 +510,14 @@
|
|||
{type: 'checkbox'}
|
||||
,{field: 'name', title: '商品名称',width:320,toolbar: '#goods-info'}
|
||||
,{field: 'cat_name',width:160, title: '商品分类'}
|
||||
,{field: 'commission_status',width:160, title: '三级分销'}
|
||||
,{field: 'ratio',width:160, title: '分销比例',toolbar: '#ratio'}
|
||||
,{field: 'price',width:180,title: '价格'}
|
||||
,{field: 'stock',width: 100,title: '总库存'}
|
||||
,{field: 'total_sales_sum',width: 100,title: '总销量'}
|
||||
,{field: 'ratio',width:160, title: '新品推荐',toolbar: '#new'}
|
||||
,{field: 'ratio',width:160, title: '好物优选',toolbar: '#best'}
|
||||
,{field: 'ratio',width:160, title: '猜你喜欢',toolbar: '#like'}
|
||||
,{field: 'ratio',width:160, title: '新品上架',toolbar: '#new'}
|
||||
,{field: 'ratio',width:160, title: '精品推荐',toolbar: '#best'}
|
||||
,{field: 'ratio',width:160, title: '今日促销',toolbar: '#like'}
|
||||
,{field: 'ratio',width:160, title: '藏品捡宝',toolbar: '#jiantreasure'}
|
||||
,{field: 'ratio',width:160, title: '镇店藏品',toolbar: '#zdtreasure'}
|
||||
,{field: 'sort',width: 80, title:'排序',event: 'tips',edit:'text',sort: true}
|
||||
,{field: 'create_time_desc',width:160, title:'发布时间'}
|
||||
,{fixed: 'right', title: '操作', align: 'center', width:300, toolbar: '#goods-operation'}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php /*a:2:{s:94:"/Library/WebServer/Documents/dggxiangmu/dggzichahu/application/admin/view/goods_brand/add.html";i:1628618358;s:86:"/Library/WebServer/Documents/dggxiangmu/dggzichahu/application/admin/view/layout2.html";i:1628618358;}*/ ?>
|
||||
<?php /*a:2:{s:94:"/Library/WebServer/Documents/dggxiangmu/dggzichahu/application/admin/view/goods_brand/add.html";i:1640335495;s:86:"/Library/WebServer/Documents/dggxiangmu/dggzichahu/application/admin/view/layout2.html";i:1628618358;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
|
@ -52,27 +52,16 @@
|
|||
</style>
|
||||
<div class="layui-form" lay-filter="">
|
||||
<div class="layui-tab">
|
||||
<!--品牌名称-->
|
||||
<!--壶类型名称-->
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"><font color="red">*</font>品牌名称</label>
|
||||
<label class="layui-form-label"><font color="red">*</font>壶类型名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="name" lay-verify="required" lay-verType="tips" placeholder="请输入品牌名称" autocomplete="off" class="layui-input">
|
||||
<input type="text" name="name" lay-verify="required" lay-verType="tips" placeholder="请输入壶类型名称" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<!--品牌首字母-->
|
||||
<!--壶类型图片-->
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"><font color="red">*</font>品牌首字母</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="initial" id="select" >
|
||||
<?php foreach($capital as $val): ?>
|
||||
<option value="<?php echo htmlentities($val); ?>"><?php echo htmlentities($val); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!--品牌图片-->
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品牌图片</label>
|
||||
<label class="layui-form-label">壶类型图片</label>
|
||||
<div class="layui-input-inline">
|
||||
<div class="img-content">
|
||||
<input name="image" type="hidden" value="">
|
||||
|
|
@ -81,11 +70,11 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--品牌排序-->
|
||||
<!--壶类型排序-->
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品牌排序</label>
|
||||
<label class="layui-form-label">壶类型排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="number" name="sort" placeholder="请输入品牌排序" class="layui-input">
|
||||
<input type="number" name="sort" placeholder="请输入壶类型排序" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<!--是否显示-->
|
||||
|
|
@ -96,11 +85,11 @@
|
|||
<input type="radio" name="is_show" value="0" title="不显示">
|
||||
</div>
|
||||
</div>
|
||||
<!--品牌描述-->
|
||||
<!--壶类型描述-->
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品牌描述</label>
|
||||
<label class="layui-form-label">壶类型描述</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea name="remark" placeholder="请输入品牌描述" class="layui-textarea"></textarea>
|
||||
<textarea name="remark" placeholder="请输入壶类型描述" class="layui-textarea"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php /*a:2:{s:99:"/Library/WebServer/Documents/dggxiangmu/dggzichahu/application/admin/view/goods_category/lists.html";i:1628618358;s:86:"/Library/WebServer/Documents/dggxiangmu/dggzichahu/application/admin/view/layout1.html";i:1628618358;}*/ ?>
|
||||
<?php /*a:2:{s:99:"/Library/WebServer/Documents/dggxiangmu/dggzichahu/application/admin/view/goods_category/lists.html";i:1640500997;s:86:"/Library/WebServer/Documents/dggxiangmu/dggzichahu/application/admin/view/layout1.html";i:1628618358;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
|
@ -36,8 +36,6 @@
|
|||
<div class="layui-btn-container" style="display: inline-block;">
|
||||
<div class="layui-btn-group">
|
||||
<button class="layui-btn layui-btn-sm layui-btn-goods_category <?php echo htmlentities($view_theme_color); ?>" id="goods_category-add">添加</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-goods_category <?php echo htmlentities($view_theme_color); ?>" id="expand-all">全部展开</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-goods_category <?php echo htmlentities($view_theme_color); ?>" id="fold-all">全部折叠</button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" id="search-value" placeholder="请输入" autocomplete="off" class="layui-input" style="display: inline-block;width: 140px;padding: 0 5px;margin-right: 5px;">
|
||||
|
|
@ -56,9 +54,9 @@
|
|||
</script>
|
||||
<script type="text/html" id="is_recommend">
|
||||
{{# if(d.is_recommend == 1){ }}
|
||||
推荐
|
||||
是
|
||||
{{# }else{}}
|
||||
不推荐
|
||||
否
|
||||
{{#}}}
|
||||
</script>
|
||||
<!-- 表格操作列 -->
|
||||
|
|
@ -112,7 +110,7 @@
|
|||
cols: [
|
||||
{field: 'name', title: '分类名称',width: 280},
|
||||
{field: '#image', title: '分类图标', width: 120,style:'height:100px;',toolbar: '#image', align: 'center'},
|
||||
{templet: '#is_recommend', title: '首页推荐', width: 100,align: 'center'},
|
||||
{templet: '#is_recommend', title: '惠藏百件', width: 100,align: 'center'},
|
||||
{templet: '#is_show', title: '显示', width: 100},
|
||||
{field: 'sort', title: '排序', width: 80, align: 'center',event: 'tips',sort: true},
|
||||
{fixed: 'right', align: 'center', toolbar: '#goods_category-operation', title: '操作', width: 180}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php /*a:2:{s:98:"/Library/WebServer/Documents/dggxiangmu/dggzichahu/application/admin/view/goods_category/edit.html";i:1628618358;s:86:"/Library/WebServer/Documents/dggxiangmu/dggzichahu/application/admin/view/layout2.html";i:1628618358;}*/ ?>
|
||||
<?php /*a:2:{s:98:"/Library/WebServer/Documents/dggxiangmu/dggzichahu/application/admin/view/goods_category/edit.html";i:1640500949;s:86:"/Library/WebServer/Documents/dggxiangmu/dggzichahu/application/admin/view/layout2.html";i:1628618358;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
|
@ -56,23 +56,13 @@
|
|||
</style>
|
||||
<div class="layui-form" lay-filter="layuiadmin-form-category" id="layuiadmin-form-category" style="padding: 20px 30px 0 0;">
|
||||
<input type="hidden" value="<?php echo htmlentities($info['id']); ?>" name="id">
|
||||
<input type="hidden" value="0" name="pid">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">名称:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="name" value="<?php echo htmlentities($info['name']); ?>" lay-verify="required" lay-verType="tips" placeholder="请输入名称" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">父级分类:</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="pid" lay-verify="required" placeholder="请选择父级分类" lay-filter="search_pid">
|
||||
<option value="0" data-level="1">顶级分类</option>
|
||||
<?php foreach($category_list as $item => $val): ?>
|
||||
<option value="<?php echo htmlentities($item); ?>"data-level=<?php echo htmlentities($val['level']); if($info['pid'] == $item): ?> selected="selected" <?php endif; ?>><?php echo htmlentities($val['name']); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">分类图标:</label>
|
||||
<div class="layui-input-inline">
|
||||
|
|
@ -99,10 +89,10 @@
|
|||
</div>
|
||||
<?php if($info['pid'] == 0): ?>
|
||||
<div class="layui-form-item is_recommend">
|
||||
<label class="layui-form-label">首页推荐:</label>
|
||||
<label class="layui-form-label">惠藏百件:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="radio" name="is_recommend" value="1" title="推荐" <?php if($info['is_recommend'] == 1): ?>checked<?php endif; ?>>
|
||||
<input type="radio" name="is_recommend" value="0" title="不推荐" <?php if($info['is_recommend'] == 0): ?>checked<?php endif; ?>>
|
||||
<input type="radio" name="is_recommend" value="1" title="是" <?php if($info['is_recommend'] == 1): ?>checked<?php endif; ?>>
|
||||
<input type="radio" name="is_recommend" value="0" title="否" <?php if($info['is_recommend'] == 0): ?>checked<?php endif; ?>>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item is_recommend">
|
||||
|
|
|
|||
Loading…
Reference in New Issue