|
Server : Apache System : Linux iZ6xhqomji47p1Z 5.10.134-15.al8.x86_64 #1 SMP Thu Jul 20 00:44:04 CST 2023 x86_64 User : www ( 1000) PHP Version : 8.1.30 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv Directory : /www/wwwroot/fsjlkj.cn/application/admin/template/shop/ |
{include file="public/layout" /}
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;min-width: auto;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page" style="min-width: auto;">
<div class="flexigrid">
<div class="hDiv">
<div class="hDivBox">
<table cellspacing="0" cellpadding="0" style="width: 100%">
<thead>
<tr>
<th class="sign w40" axis="col0">
<div class="tc">ID</div>
</th>
<th abbr="article_time" axis="col4" class="w180">
<div class="">规格名称</div>
</th>
<th abbr="ac_id" axis="col4">
<div class="">规格值</div>
</th>
<th abbr="article_time" axis="col4" class="w160">
<div class="tc">操作</div>
</th>
</tr>
</thead>
</table>
</div>
</div>
<div class="bDiv" style="height: auto;">
<form id="PostForm">
<div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
<table style="width: 100%">
<tbody>
{volist name="info" id="vo"}
<tr>
<td class="sign">
<div class="w40 tc">
<input type="checkbox" name="" value="">
</div>
</td>
<td class="" >
<div class="w180 tc" style="text-align: left;">
{$vo.preset_name}
</div>
</td>
<td style="width: 100%">
<div style="text-align: left;">
{volist name="vo.preset_value" id="value"}
<label>
<input type="checkbox" name="" value="">{$value.preset_value}
</label>
{/volist}
</div>
</td>
<td class="">
<div class="w160 tc">
<a href="JavaScript:void(0);" data-id="{$vo.preset_id}" onclick="SelectSpec(this);" class="btn blue">
<i class="fa fa-pencil-square-o"></i>选择
</a>
</div>
</td>
</tr>
{/volist}
</tbody>
</table>
</div>
</form>
<div class="iDiv" style="display: none;"></div>
</div>
<div class="tDiv">
<div class="tDiv2">
<div class="fbutton">
<a href="JavaScript:void(0);" onclick="SaveSpecTpl(this);">
<div class="add" title="批量选择">
<span class="red"></i>批量选择</span>
</div>
</a>
</div>
</div>
<div style="clear:both"></div>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
// 表格行点击选中切换
$('#flexigrid > table>tbody >tr').click(function(){
$(this).toggleClass('trSelected');
});
// 点击刷新数据
$('.fa-refresh').click(function(){
location.href = location.href;
});
});
function SelectSpec(obj, preset_id){
var url = "{:url('Shop/spec_select')}";
$.ajax({
type : 'post',
url : url,
data : {preset_id:preset_id, _ajax:1},
dataType : 'json',
success : function(data){
// layer.closeAll();
// if(0 == data.code){
// layer.alert(data.msg, {icon: 2, title:false});
// }
}
});
// SpecTempLateDiv
}
// 删除指定规格值
function DelSpecTplValue(obj, preset_id = null){
var del_val = $(obj).next().val();
layer.confirm('确认删除规格值:<span style="color:red;">'+del_val+'</span>?', {
shade: layer_shade,
area: ['480px', '190px'],
move: false,
title: '提示',
btnAlign:'r',
closeBtn: 3,
btn: ['确定', '取消'] ,//按钮
success: function () {
$(".layui-layer-content").css('text-align', 'left');
}
}, function () {
if (preset_id) {
var url = "{:url('Shop/spec_del')}";
$.ajax({
type : 'post',
url : url,
data : {preset_id:preset_id, _ajax:1},
dataType : 'json',
success : function(data){
layer.closeAll();
if(0 == data.code){
layer.alert(data.msg, {icon: 2, title:false});
}
}
});
}
// 确定
$(obj).parent().remove();
layer.closeAll();
layer.msg('操作成功!', {icon: 1, time:1500});
}, function (index) {
// 取消
layer.closeAll(index);
});
}
// 保存规格信息
function SaveSpecTpl(obj){
// layer_loading('正在处理');
var url = "{:url('Shop/spec_template', ['_ajax'=>1])}";
$.ajax({
type : 'post',
url : url,
data : $('#PostForm').serialize(),
dataType : 'json',
success : function(data){
layer.closeAll();
if(data.code == 1){
layer.msg(data.msg, {icon: 1, time:1500},function(){
window.location.reload();
});
}else{
layer.alert(data.msg, {icon: 2, title:false});
}
}
});
}
</script>
{include file="public/footer" /}