This commit is contained in:
2024-10-29 14:04:59 +08:00
commit 48bf3e6f33
2839 changed files with 762707 additions and 0 deletions

View File

@@ -0,0 +1,130 @@
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
添加问题分类
</h1>
<ol class="breadcrumb">
<li><a href="<?php echo url('/admin/index/index');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
<li><a href="<?php echo url('/admin/question_category/lists');?>"> 问题分类列表</a></li>
<li class="active"> 问题分类</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-md-10">
<form class="form-horizontal" action="<?php echo url('/admin/question_category/create');?>" method="post">
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active"><a href="#navfirst" data-toggle="tab"><i class="fa fa-edit text-green"></i> 基本信息</a></li>
<!-- <li><a href="#navsecond" data-toggle="tab">详细内容</a></li> -->
</ul>
<div class="tab-content">
<div class="active tab-pane" id="navfirst">
<div class="form-group">
<label for="question" class="col-sm-2 control-label">分类名称<em style="color:red;">*</em></label>
<div class="col-sm-5">
<input type="text" class="form-control" name="name" id="name" required>
</div>
<div class="col-sm-5">
<span class="help-block">(分类名称)</span>
</div>
</div>
<div class="form-group">
<label for="sort" class="col-sm-2 control-label">排序<em style="color:red;">*</em></label>
<div class="col-sm-2">
<input type="text" class="form-control" name="sort" id="sort" value="9999">
</div>
<div class="col-sm-5 col-sm-offset-3">
<span class="help-block">(排序)</span>
</div>
</div>
</div>
<!-- /.tab-pane -->
</div>
<!-- /.tab-content -->
<div class="nav-footer row">
<div class="col-sm-2 col-sm-offset-2">
<p><button id="reset-btn" type="button" class="btn btn-warning btn-block">重置</button></p>
</div>
<div class="col-sm-2">
<p><button id="submit-btn" type="submit" class="btn btn-danger btn-block">提交</button></p>
</div>
<!-- /. row -->
</div>
</div>
<!-- /.nav-tabs-custom -->
</form>
</div>
<div class="col-md-2">
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title">快捷入口</h3>
</div>
<div class="box-body">
<a href="<?php echo url('/admin/question_category/lists');?>" class="btn btn-block btn-primary">列表</a>
<a href="<?php echo url('/admin/question_category/add');?>" class="btn btn-block btn-primary">添加</a>
</div>
</div>
</div>
</div>
</section>
<!-- /.content -->
</div>
<style>
.table thead > tr > td, .table tbody > tr > td {
vertical-align: middle;
}
</style>
<!-- /.content-wrapper -->
<?php echo editor('#content');?>
<script>
$(function() {
$("#reset-btn").click(function(e) {
if (confirm('确认重置所有表单项吗?')) {
this.form.reset();
}
});
$("form.form-horizontal").submit(function(e) {
var nameObj = document.getElementById('name');
if (isNull(nameObj.value)) {
alert('名称必须填写');
nameObj.focus();
return false;
}
var sortObj = document.getElementById('sort');
if (isNaN(sortObj.value)) {
alert('排序值必须是数字');
sortObj.focus();
return false;
}
// var agree = $("input[name='agree']", this).prop('checked');
// if (agree) {
// alert("Submitted");
// e.preventDefault();
// } else {
// e.preventDefault();
// alert("请勾选确认");
// }
});
});
$(function() {
$("#btn-product-qas").click(function(e) {
//var callback = $(this).data('callback');
var $element = $(this).parent().parent();
$('#modal-product').remove();
$.ajax({
url: "<?php echo url('/admin/product/modallists');?>?inputid=" + $element.find('input[type=hidden]').attr('id') + '&titleid=' + $element.find('input[type=text]').attr('id'),
dataType: 'html',
success: function(html) {
$('body').append('<div id="modal-product" class="modal fade">' + html + '</div>');
$('#modal-product').modal({show: true, backdrop: 'static'});
}
});
});
});
</script>

View File

@@ -0,0 +1,131 @@
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
编辑问题分类
</h1>
<ol class="breadcrumb">
<li><a href="<?php echo url('/admin/index/index');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
<li><a href="<?php echo url('/admin/question_category/lists');?>"> 问题分类列表</a></li>
<li class="active"> 问题分类</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-md-10">
<form class="form-horizontal" action="<?php echo url('/admin/question_category/update');?>" method="post">
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active"><a href="#navfirst" data-toggle="tab"><i class="fa fa-edit text-green"></i> 基本信息</a></li>
</ul>
<div class="tab-content">
<div class="active tab-pane" id="navfirst">
<div class="form-group">
<label class="col-sm-2 control-label">分类名称<em style="color:red;">*</em></label>
<div class="col-sm-5">
<input type="text" class="form-control" name="name" id="name" required value="<?php echo $question_category['name'];?>">
</div>
<div class="col-sm-5">
<span class="help-block">(分类名称)</span>
</div>
</div>
<div class="form-group">
<label for="sort" class="col-sm-2 control-label">排序<em style="color:red;">*</em></label>
<div class="col-sm-2">
<input type="text" class="form-control" name="sort" id="sort" value="<?php echo $question_category['sort'];?>">
</div>
<div class="col-sm-5 col-sm-offset-3">
<span class="help-block">(排序)</span>
</div>
</div>
</div>
<!-- /.tab-pane -->
</div>
<!-- /.tab-content -->
<div class="nav-footer row">
<input name="id" value="<?php echo $question_category['id'];?>" type="hidden">
<div class="col-sm-2 col-sm-offset-2">
<p><button id="reset-btn" type="button" class="btn btn-warning btn-block">重置</button></p>
</div>
<div class="col-sm-2">
<p><button id="submit-btn" type="submit" class="btn btn-danger btn-block">提交</button></p>
</div>
<!-- /. row -->
</div>
</div>
<!-- /.nav-tabs-custom -->
</form>
</div>
<div class="col-md-2">
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title">快捷入口</h3>
</div>
<div class="box-body">
<a href="<?php echo url('/admin/question_category/lists');?>" class="btn btn-block btn-primary">列表</a>
<a href="<?php echo url('/admin/question_category/add');?>" class="btn btn-block btn-primary">添加</a>
</div>
</div>
</div>
</div>
</section>
<!-- /.content -->
</div>
<style>
.table thead > tr > td, .table tbody > tr > td {
vertical-align: middle;
}
</style>
<!-- /.content-wrapper -->
<?php echo editor('#content');?>
<script>
$(function() {
$("#reset-btn").click(function(e) {
if (confirm('确认重置所有表单项吗?')) {
this.form.reset();
}
});
$("form.form-horizontal").submit(function(e) {
var nameObj = document.getElementById('name');
if (isNull(nameObj.value)) {
alert('名称必须填写');
nameObj.focus();
return false;
}
var sortObj = document.getElementById('sort');
if (isNaN(sortObj.value)) {
alert('排序值必须是数字');
sortObj.focus();
return false;
}
// var agree = $("input[name='agree']", this).prop('checked');
// if (agree) {
// alert("Submitted");
// e.preventDefault();
// } else {
// e.preventDefault();
// alert("请勾选确认");
// }
});
});
$(function() {
$("#btn-product-qas").click(function(e) {
//var callback = $(this).data('callback');
var $element = $(this).parent().parent();
$('#modal-product').remove();
$.ajax({
url: "<?php echo url('/admin/product/modallists');?>?inputid=" + $element.find('input[type=hidden]').attr('id') + '&titleid=' + $element.find('input[type=text]').attr('id'),
dataType: 'html',
success: function(html) {
$('body').append('<div id="modal-product" class="modal fade">' + html + '</div>');
$('#modal-product').modal({show: true, backdrop: 'static'});
}
});
});
});
</script>

View File

@@ -0,0 +1,105 @@
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
问题管理
<small>问题列表</small>
</h1>
<ol class="breadcrumb">
<li><a href="<?php echo url('/admin/index/index');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
<li><a href="<?php echo url('/admin/question/lists');?>"> 问题</a></li>
<li class="active"> 问题列表</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">问题列表</h3>
<div class="box-tools pull-right">
</div>
<!-- /.box-tools -->
</div>
<!-- /.box-header -->
<div class="box-body no-padding">
<div class="table-responsive lists-table">
<table class="table table-hover table-bordered">
<tbody>
<tr>
<th width="35rem">&nbsp;</th>
<th width="60rem" class="text-center">ID</th>
<th class="text-center">分类名称</th>
<th width="100rem" class="text-center">排序</th>
<th width="300rem" class="text-center">添加时间</th>
<th width="200rem" class="text-center">操作</th>
</tr>
<?php if(!empty($question_catelist)):?>
<?php foreach($question_catelist as $key => $value):?>
<tr>
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $value['id'];?>"></td>
<td class="text-center"><?php echo $value['id'];?></td>
<td class="text-center">
<a href="<?php echo url('/admin/question_category/edit',['id'=>$value['id']]);?>"><?php echo $value['name'];?></a>
</td>
<td class="text-center">
<input size="3" maxlength="7" value="<?php echo $value['sort'];?>" type="text" data-id="<?php echo $value['id'];?>" data-url="<?php echo url('/admin/question_category/updatesort');?>" data-cod="sort">
</td>
<td class="text-center"><?php echo $value['create_time'];?></td>
<td class="text-center">
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/question_category/edit',['id'=>$value['id']]);?>">编辑</a>
<a class="btn btn-xs btn-info" data-id="<?php echo $value['id'];?>" data-url="<?php echo url('/admin/question_category/delete');?>" data-cod="dowarn">删除</a>
</td>
</tr>
<?php endforeach;?>
<?php endif;?>
</tbody>
</table>
<!-- /.table -->
</div>
<!-- /.lists-table -->
</div>
<!-- /.box-body -->
<div class="box-footer no-padding">
<div class="mailbox-controls row">
<div class="col-sm-6">
<button type="button" class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></button>
<div class="btn-group">
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/question_category/deletes');?>" data-cod="batch">删除</button>
<button type="button" class="btn btn-default btn-sm" data-cod="refresh">刷新</button>
</div>
<!-- /.btn-group -->
<a href="<?php echo url('/admin/question_category/add');?>" class="btn btn-default btn-sm">添加</a>
</div>
<div class="col-sm-6">
<div class="pull-right">
<?php
if (!empty($page))
echo $page;
?>
</div>
<!-- /.pull-right -->
</div>
</div>
</div>
</div>
<!-- /.box -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<style>
.table-responsive .table tbody > tr > th,.table-responsive .table thead > tr > td, .table-responsive .table tbody > tr > td {
vertical-align: middle;
}
</style>
<!-- Page Script -->
<script>
$(function() {
});
</script>