Commit c436018b by Joneq

系统公告开发-基本页面完成

parent bce5ae4f
......@@ -8,6 +8,7 @@
namespace App\Http\Controllers;
use App\Logic\SystemNoticeLogic;
use Illuminate\Http\Request;
use App\Http\Requests;
use DB;
......@@ -32,6 +33,85 @@ class MessageApiController extends Controller
exit();
}
//获取系统更新信息列表
private function systemUpdateList($request)
{
$data = $request->all();
try{
$returnData = (new SystemNoticeLogic())->getSystemUpdateList($data);
echo json_encode(['code'=>0,'count'=>count($returnData),'data'=>$returnData,'msg'=>'获取成功']);
exit();
}catch(\Exception $e){
echo json_encode(['code'=>400,'msg'=>$e->getMessage()]);
exit();
}
}
//获取系统宣讲列表
private function systemPreachList($request)
{
$data = $request->all();
try{
$returnData = (new SystemNoticeLogic())->getSystemPreachList($data);
echo json_encode(['code'=>0,'count'=>count($returnData),'data'=>$returnData,'msg'=>'获取成功']);
exit();
}catch(\Exception $e){
echo json_encode(['code'=>400,'msg'=>$e->getMessage()]);
exit();
}
}
//获取系统公告列表
private function systemBulletinList($request)
{
$data = $request->all();
try{
$returnData = (new SystemNoticeLogic())->getSystemBulletinList($data);
echo json_encode(['code'=>0,'count'=>count($returnData),'data'=>$returnData,'msg'=>'获取成功']);
exit();
}catch(\Exception $e){
echo json_encode(['code'=>400,'msg'=>$e->getMessage()]);
exit();
}
}
//保存系统更新信息
private function saveSystemUpdate($request)
{
$data = $request->all();
try{
(new SystemNoticeLogic())->saveSystemUpdate($data);
$this->Export(0, '操作成功');
}catch(\Exception $e){
$this->Export(400, $e->getMessage());
}
}
//保存系统宣讲信息
private function saveSystemPreach($request)
{
$data = $request->all();
try{
(new SystemNoticeLogic())->saveSystemPreach($data);
$this->Export(0, '操作成功');
}catch(\Exception $e){
$this->Export(400, $e->getMessage());
}
}
//保存系统公告信息
private function saveSystemBulletin($request)
{
$data = $request->all();
try{
(new SystemNoticeLogic())->saveSystemBulletin($data);
$this->Export(0, '操作成功');
}catch(\Exception $e){
$this->Export(400, $e->getMessage());
}
}
//删除消息模板
public function deletetemplate($request){
$data = $request->input();
......
<?php
/**
* Created by 2022/12/2.
* User: Jone
* Info: 2022/12/2
* Time: 上午10:25
*/
namespace App\Logic;
//系统通知逻辑层
use App\Model\SystemBulletinModel;
use App\Model\SystemPreachModel;
use App\Model\SystemUpdateModel;
use Illuminate\Support\Facades\DB;
//TODO 上线之后去除注释这个notice ,5。0版本的缺陷 https://blog.csdn.net/weixin_44251615/article/details/93710829
ini_set("error_reporting","E_ALL & ~E_NOTICE");
class SystemNoticeLogic
{
//获得系统更新列表
public function getSystemUpdateList($where)
{
$obj = (new SystemUpdateModel())->getWhereObj($where);
$returnData = $obj->paginate(10)->toArray();
if(empty($returnData['data'])){
throw new \Exception('暂无数据');
}
foreach ($returnData['data'] as &$value){
$value['update_time'] = date('Y-m-d H:i:s',$value['update_time']);
$value['data_json'] = json_encode($value);
}
return $returnData['data'];
}
//获得系统宣讲列表
public function getSystemPreachList($where)
{
$obj = (new SystemPreachModel())->getWhereObj($where);
$returnData = $obj->paginate(10)->toArray();
if(empty($returnData['data'])){
throw new \Exception('暂无数据');
}
foreach ($returnData['data'] as &$value){
$value['preach_time'] = date('Y-m-d H:i:s',$value['preach_time']);
$value['data_json'] = json_encode($value);
}
return $returnData['data'];
}
//获得系统公告列表
public function getSystemBulletinList($where)
{
$obj = (new SystemBulletinModel())->getWhereObj($where);
$returnData = $obj->paginate(10)->toArray();
if(empty($returnData['data'])){
throw new \Exception('暂无数据');
}
foreach ($returnData['data'] as &$value){
$value['create_time'] = date('Y-m-d H:i:s',$value['create_time']);
$value['data_json'] = json_encode($value);
}
return $returnData['data'];
}
//保存或者新增数据
public function saveSystemUpdate($data)
{
$data['update_time'] = strtotime($data['update_time']);
$data = self::setSystemInfo($data);
$systemUpdateModel = (new SystemUpdateModel());
$smueid = $data['smue_id'];unset($data['smue_id']);
//id没有值是新增,id有值是保存
if (empty($smueid)){
$data['create_time'] = time();
$systemUpdateModel->insertGetId($data);
}else{
$systemUpdateModel->where('smue_id',$smueid)->update($data);
}
}
//保存或者新增数据
public function saveSystemPreach($data)
{
$time = time();
$data['preach_time'] = strtotime($data['preach_time']);
$data = self::setSystemInfo($data);
$data = self::setDepartmentInfo($data);
$systemUpdateModel = (new SystemPreachModel());
$smphid = $data['smph_id'];unset($data['smph_id']);
//id没有值是新增,id有值是保存
if (empty($smphid)){
$data['create_time'] = $time;
$systemUpdateModel->insertGetId($data);
}else{
$data['update_time'] = $time;
$systemUpdateModel->where('smph_id',$smphid)->update($data);
}
}
//保存或者新增数据
public function saveSystemBulletin($data)
{
$time = time();
$systemBulletinModel = (new SystemBulletinModel());
$smbnid = $data['smbn_id'];unset($data['smbn_id']);
//id没有值是新增,id有值是保存
if (empty($smbnid)){
$data['create_time'] = $time;
$data['is_send'] = '未发送';
$systemBulletinModel->insertGetId($data);
}else{
$data['update_time'] = $time;
$systemBulletinModel->where('smbn_id',$smbnid)->update($data);
}
}
static public function getAllSystemSelect()
{
return DB::table('t_business_config')->orderBy('bid','desc')->pluck('title','bid');
}
static public function getAllUserDepartment()
{
return DB::table('user_department')->orderBy('department_id','desc')->pluck('department_name','department_id');
}
static public function setSystemInfo($data)
{
$systemInfo = DB::table('t_business_config')->where('bid',$data['system_id'])->first();
$data['system_name'] = $systemInfo->title;
$data['system_url'] = $systemInfo->url;
return $data;
}
static public function setDepartmentInfo($data)
{
$data['department_name'] = DB::table('user_department')->where('department_id',$data['department_id'])->value('department_name');
return $data;
}
}
\ No newline at end of file
<?php
/**
* Created by 2022/12/2.
* User: Jone
* Info: 2022/12/2
* Time: 上午10:28
*/
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class SystemBulletinModel extends Model
{
protected $connection = 'messagemodel';
protected $table = 'system_bulletin';
protected $primaryKey = 'smbn_id';
public $timestamps = false;
public function getWhereObj($data)
{
$obj = self::where('smbn_id','>',0);
foreach ($data as $key=>$val){
if ($val === '')continue;
switch ($key){
case 'system_name':
case 'update_type':
case 'version_num':
case 'weonlt_id':
$obj = $obj->where($key,$val);break;
case 'update_title':
case 'update_content':
$obj = $obj->where($key,'like','%'.$val.'%');break;
case 'begin_time':
$obj = $obj->where('create_time','>=',strtotime($val));break;
case 'end_time':
$obj = $obj->where('create_time','<=',strtotime($val));break;
}
}
return $obj;
}
}
\ No newline at end of file
<?php
/**
* Created by 2022/12/2.
* User: Jone
* Info: 2022/12/2
* Time: 上午10:27
*/
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class SystemPreachModel extends Model
{
protected $connection = 'messagemodel';
protected $table = 'system_preach';
protected $primaryKey = 'smph_id';
public $timestamps = false;
public function getWhereObj($data)
{
$obj = self::where('smph_id','>',0);
foreach ($data as $key=>$val){
if ($val === '')continue;
switch ($key){
case 'preach_user':
case 'department_id':
case 'system_id':
$obj = $obj->where($key,$val);break;
case 'company_name':
$obj = $obj->where($key,'like','%'.$val.'%');break;
case 'begin_time':
$obj = $obj->where('create_time','>=',strtotime($val));break;
case 'end_time':
$obj = $obj->where('create_time','<=',strtotime($val));break;
}
}
return $obj;
}
}
\ No newline at end of file
<?php
/**
* Created by 2022/12/2.
* User: Jone
* Info: 2022/12/2
* Time: 上午10:27
*/
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class SystemUpdateModel extends Model
{
protected $connection = 'messagemodel';
protected $table = 'system_update';
protected $primaryKey = 'smue_id';
public $timestamps = false;
public function getWhereObj($data)
{
$obj = self::where('smue_id','>',0);
foreach ($data as $key=>$val){
if ($val === '')continue;
switch ($key){
case 'system_name':
case 'update_type':
case 'version_num':
case 'weonlt_id':
$obj = $obj->where($key,$val);break;
case 'update_title':
case 'update_content':
$obj = $obj->where($key,'like','%'.$val.'%');break;
case 'begin_time':
$obj = $obj->where('create_time','>=',strtotime($val));break;
case 'end_time':
$obj = $obj->where('create_time','<=',strtotime($val));break;
}
}
return $obj;
}
}
\ No newline at end of file
......@@ -123,6 +123,19 @@ return [
'prefix' => '',
'strict' => false,
],
'messagemodel' => [
'driver' => 'mysql',
'host' => env('DB_HOST_MESSAGE', ''),
'database' => env('DB_DATABASE_MESSAGE', ''),
'username' => env('DB_USERNAME_MESSAGE', ''),
'password' => env('DB_PASSWORD_MESSAGE', ''),
'port' => env('DB_PORT', 3306),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => 'lie_',
'strict' => false,
],
],
......
layui.use(['jquery','element', 'layer', 'form','table','laypage','laydate'], function(){
var $ = layui.$;
var layer = layui.layer;
var form = layui.form;
var table = layui.table;
form.render();
//数据表格渲染
var dataList = function(){
table.render({
elem: '#systemBulletinList',
url: '/msgapi/systemBulletinList',
page: true,
limit: 20,
id:'table',
cols: [[ //表头
{field: 'smbn_id', title: '序号',align:'center',width:100},
{field: 'create_time', title: '创建时间',align:'center',width:150},
{field: 'title', title: '公告标题',align:'center',width:150},
{field: 'is_send', title: '状态',align:'center',width:150},
{field: 'active', toolbar: '#active', title: '操作',align:'center',width:150, fixed:'right'}
]]
});
};
dataList();
form.on('submit(load)', function (data) {
//执行重载
table.reload('table', {
page: {
curr: 1
}
, where: data.field
});
return false;
});
$("#addData").click(function () {
$("#data_form_jq")[0].reset();
form.render();
layer.open({
area: ['1000px', '500px'],
title: '保存数据',
type: 1,
content: $("#save_form_show"),
btn: ['确认保存', '取消'],
offset:['100px','100px'],
yes: function (index) {
$("#save_form_click").click();
},
cancel: function (index) {
layer.close(index);
}
});
});
$(document).on('click', '.editData', function () {
var jsonData = $(this).data('json');
form.val("data_form", jsonData);
form.render();
layer.open({
area: ['1000px', '500px'],
title: '保存数据',
type: 1,
content: $("#save_form_show"),
btn: ['确认保存', '取消'],
offset:['100px','100px'],
yes: function (index) {
$("#save_form_click").click();
},
cancel: function (index) {
layer.close(index);
}
});
});
form.on('submit(save_form)', function (data) {
$.ajax({
url: '/msgapi/saveSystemBulletin',
type: 'post',
data: data.field,
dataType:'json',
success: function (resp) {
if (resp.errcode == 0) {
layer.msg(resp.errmsg);
window.location.reload();
return false;
}
layer.msg(resp.errmsg);
},
error: function (err) {
console.log(err)
}
});
return false;
});
});
layui.use(['jquery','element', 'layer', 'form','table','laypage','laydate'], function(){
var $ = layui.$;
var layer = layui.layer;
var form = layui.form;
var table = layui.table;
var laydate = layui.laydate;
laydate.render({
elem: '#begin_time' //指定元素
});
laydate.render({
elem: '#end_time' //指定元素
});
laydate.render({
elem: '#preach_time', //指定元素
format: 'yyyy-MM-dd HH:mm:ss'
,type: 'datetime'
});
form.render();
//数据表格渲染
var dataList = function(){
table.render({
elem: '#systemPreachList',
url: '/msgapi/systemPreachList',
page: true,
limit: 20,
id:'table',
cols: [[ //表头
{field: 'smph_id', title: '序号',align:'center',width:100},
{field: 'preach_time', title: '宣讲时间',align:'center',width:150},
{field: 'system_name', title: '宣讲系统',align:'center',width:150},
{field: 'preach_content', title: '宣讲内容',align:'center',width:150},
{field: 'preach_user', title: '宣讲人',align:'center',width:150},
{field: 'department_name', title: '宣讲部门',align:'center',width:150},
{field: 'preach_feedback', title: '宣讲反馈',align:'center',width:150},
{field: 'active', toolbar: '#active', title: '操作',align:'center',width:150, fixed:'right'}
]]
});
};
dataList();
form.on('submit(load)', function (data) {
//执行重载
table.reload('table', {
page: {
curr: 1
}
, where: data.field
});
return false;
});
$("#addData").click(function () {
$("#data_form_jq")[0].reset();
form.render();
layer.open({
area: ['400px', '600px'],
title: '保存数据',
type: 1,
content: $("#save_form_show"),
btn: ['确认保存', '取消'],
offset:['30px','300px'],
yes: function (index) {
$("#save_form_click").click();
},
cancel: function (index) {
layer.close(index);
}
});
});
$(document).on('click', '.editData', function () {
var jsonData = $(this).data('json');
form.val("data_form", jsonData);
form.render();
layer.open({
area: ['400px', '560px'],
title: '保存数据',
type: 1,
content: $("#save_form_show"),
btn: ['确认保存', '取消'],
offset:['30px','300px'],
yes: function (index) {
$("#save_form_click").click();
},
cancel: function (index) {
layer.close(index);
}
});
});
form.on('submit(save_form)', function (data) {
$.ajax({
url: '/msgapi/saveSystemPreach',
type: 'post',
data: data.field,
dataType:'json',
success: function (resp) {
if (resp.errcode == 0) {
layer.msg(resp.errmsg);
window.location.reload();
return false;
}
layer.msg(resp.errmsg);
},
error: function (err) {
console.log(err)
}
});
return false;
});
});
layui.use(['jquery','element', 'layer', 'form','table','laypage','laydate'], function(){
var $ = layui.$;
var element = layui.element;
var layer = layui.layer;
var form = layui.form;
var table = layui.table;
var laydate = layui.laydate;
laydate.render({
elem: '#begin_time' //指定元素
});
laydate.render({
elem: '#end_time' //指定元素
});
laydate.render({
elem: '#update_time', //指定元素
format: 'yyyy-MM-dd HH:mm:ss'
,type: 'datetime'
});
form.render();
//数据表格渲染
var dataList = function(){
table.render({
elem: '#systemUpdateList',
url: '/msgapi/systemUpdateList',
page: true,
limit: 20,
id:'table',
cols: [[ //表头
{field: 'smue_id', title: '序号',align:'center',width:100},
{field: 'update_time', title: '更新日期',align:'center',width:150},
{field: 'system_name', title: '更新系统',align:'center',width:150},
{field: 'version_num', title: '版本号',align:'center',width:150},
{field: 'update_type', title: '更新类型',align:'center',width:150},
{field: 'update_title', title: '更新标题',align:'center',width:150},
{field: 'update_content', title: '更新内容',align:'center',width:150},
{field: 'product_user', title: '产品负责人',align:'center',width:150},
{field: 'code_user', title: '技术负责人',align:'center',width:180},
{field: 'test_user', title: '测试负责人',align:'center',width:180},
{field: 'preach_count', title: '公告发送次数',align:'center',width:180},
{field: 'email_count', title: '邮件发送次数',align:'center',width:180},
{field: 'active', toolbar: '#active', title: '操作',align:'center',width:150, fixed:'right'}
]]
});
};
dataList();
form.on('submit(load)', function (data) {
//执行重载
table.reload('table', {
page: {
curr: 1
}
, where: data.field
});
return false;
});
$("#addData").click(function () {
$("#data_form_jq")[0].reset();
form.render();
layer.open({
area: ['400px', '800px'],
title: '保存数据',
type: 1,
content: $("#save_form_show"),
btn: ['确认保存', '取消'],
offset:['100px','300px'],
yes: function (index) {
$("#save_form_click").click();
},
cancel: function (index) {
layer.close(index);
}
});
});
$(document).on('click', '.editData', function () {
var jsonData = $(this).data('json');
form.val("data_form", jsonData);
form.render();
layer.open({
area: ['400px', '760px'],
title: '保存数据',
type: 1,
content: $("#save_form_show"),
btn: ['确认保存', '取消'],
offset:['30px','300px'],
yes: function (index) {
$("#save_form_click").click();
},
cancel: function (index) {
layer.close(index);
}
});
});
form.on('submit(save_form)', function (data) {
$.ajax({
url: '/msgapi/saveSystemUpdate',
type: 'post',
data: data.field,
dataType:'json',
success: function (resp) {
if (resp.errcode == 0) {
layer.msg(resp.errmsg);
window.location.reload();
return false;
}
layer.msg(resp.errmsg);
},
error: function (err) {
console.log(err)
}
});
return false;
});
});
......@@ -10,14 +10,72 @@
}
</style>
<form class="layui-form layui-box" method="post">
<div class="layui-form-item">
<div class="layui-btn-container" style="text-align: center; margin-top: 10px;">
<button lay-submit lay-filter="load" class="layui-btn" data-type="search">搜索</button>
<button type="button" class="layui-btn layui-btn-normal" id="addData">新增</button>
</div>
</div>
</form>
<table id="bulletionList" lay-filter="bulletionList"></table>
<table id="systemBulletinList" lay-filter="systemBulletinList"></table>
<script type="text/html" id="active">
<a class="layui-btn layui-btn-xs layui-btn-normal editData" data-json='@{{d.data_json}}' ><strong>编辑</strong></a>
<a class="layui-btn layui-btn-xs layui-btn-normal " ><strong>立即发送</strong></a>
</script>
{{--保存数据--}}
<div id="save_form_show" style="display: none;margin-top: 30px;">
<style>
.fgh .layui-form-label{position: relative;top:5px;width: 100px;}
</style>
<form class="layui-form fgh" lay-filter="data_form" id="data_form_jq">
<div class="layui-form-item">
<div class="layui-inline ">
<label class="layui-form-label">公告标题:</label>
<div class="layui-input-inline">
<input type="text" class="layui-input" lay-verify="required" name="title" id="title" >
</div>
</div>
</div>
<input type="hidden" name="smbn_id" value="0" id="smbn_id">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label" >宣讲内容:</label>
<div class="layui-input-inline">
<textarea name="content" class="layui-textarea" style="min-height: 270px;width: 700px" lay-verify="required" ></textarea>
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<button class="layui-btn" style="display: none;" id="save_form_click" lay-filter="save_form" lay-submit >提交</button>
</div>
</div>
</form>
</div>
......
......@@ -27,9 +27,11 @@
<div class="layui-inline">
<label class="layui-form-label">系统名称</label>
<div class="layui-input-inline">
<select name="system_name" lay-verify="" lay-search>
<option value=""></option>
<select name="system_id" lay-verify="" lay-search>
<option value="">请选择</option>
@foreach(\App\Logic\SystemNoticeLogic::getAllSystemSelect() as $key=>$value)
<option value="{{$key}}">{{$value}}</option>
@endforeach
</select>
</div>
</div>
......@@ -37,8 +39,11 @@
<div class="layui-inline">
<label class="layui-form-label">宣讲部门</label>
<div class="layui-input-inline">
<select name="preach_department" lay-verify="" lay-search>
<option value=""></option>
<select name="department_id" lay-verify="" lay-search>
<option value="">请选择</option>
@foreach(\App\Logic\SystemNoticeLogic::getAllUserDepartment() as $key=>$value)
<option value="{{$key}}">{{$value}}</option>
@endforeach
</select>
</div>
</div>
......@@ -57,8 +62,7 @@
<div class="layui-form-item">
<div class="layui-btn-container" style="text-align: center; margin-top: 10px;">
<button lay-submit lay-filter="load" class="layui-btn" data-type="search">搜索</button>
<button type="button" class="layui-btn layui-btn-normal export">导出</button>
<!-- <button lay-submit lay-filter="load" class="layui-btn layui-btn-normal" data-type="export">导出</button> -->
<button type="button" class="layui-btn layui-btn-normal" id="addData">新增</button>
</div>
</div>
</form>
......@@ -66,10 +70,96 @@
<table id="orderList" lay-filter="orderList"></table>
<table id="systemPreachList" lay-filter="systemPreachList"></table>
<script type="text/html" id="active">
<a class="layui-btn layui-btn-xs layui-btn-normal editData" data-json='@{{d.data_json}}' ><strong>编辑</strong></a>
<a class="layui-btn layui-btn-xs layui-btn-normal " ><strong>立即发送</strong></a>
</script>
{{--新增数据--}}
<div id="save_form_show" style="display: none;margin-top: 30px;">
<style>
.fgh .layui-form-label{position: relative;top:5px;width: 100px;}
</style>
<form class="layui-form fgh" lay-filter="data_form" id="data_form_jq">
<div class="layui-form-item">
<div class="layui-inline ">
<label class="layui-form-label">宣讲时间:</label>
<div class="layui-input-inline">
<input type="text" class="layui-input" lay-filter="update_time" lay-verify="required" name="preach_time" id="preach_time" >
</div>
</div>
</div>
<input type="hidden" name="smph_id" value="0" id="smph_id">
<div class="layui-form-item">
<label class="layui-form-label">宣讲系统</label>
<div class="layui-input-inline">
<select name="system_id" lay-search lay-verify="required">
@foreach(\App\Logic\SystemNoticeLogic::getAllSystemSelect() as $key=>$value)
<option value="{{$key}}">{{$value}}</option>
@endforeach
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">宣讲部门</label>
<div class="layui-input-inline">
<select name="department_id" lay-search lay-verify="required">
@foreach(\App\Logic\SystemNoticeLogic::getAllUserDepartment() as $key=>$value)
<option value="{{$key}}">{{$value}}</option>
@endforeach
</select>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label" >宣讲内容:</label>
<div class="layui-input-inline">
<textarea name="preach_content" cols="30" rows="10" class="layui-textarea" style="height: 30px;" lay-verify="required" ></textarea>
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">宣讲人</label>
<div class="layui-input-inline">
<input type="text" name="preach_user" placeholder="填写宣讲人" autocomplete="off" class="layui-input" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label" >宣讲反馈:</label>
<div class="layui-input-inline">
<textarea name="preach_feedback" cols="30" rows="10" class="layui-textarea" style="height: 30px;" lay-verify="required" ></textarea>
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<button class="layui-btn" style="display: none;" id="save_form_click" lay-filter="save_form" lay-submit >提交</button>
</div>
</div>
</form>
</div>
......
......@@ -8,9 +8,10 @@
margin-top: 20px;
width: 150px;
}
</style>
<form class="layui-form layui-box" method="post">
<form class="layui-form layui-box" >
<div class="layui-form-item">
<div class="layui-inline">
......@@ -27,9 +28,11 @@
<div class="layui-inline">
<label class="layui-form-label">系统名称</label>
<div class="layui-input-inline">
<select name="system_name" lay-verify="" lay-search>
<option value=""></option>
<select name="system_id" lay-verify="" lay-search>
<option value="">请选择</option>
@foreach(\App\Logic\SystemNoticeLogic::getAllSystemSelect() as $key=>$value)
<option value="{{$key}}">{{$value}}</option>
@endforeach
</select>
</div>
</div>
......@@ -37,9 +40,12 @@
<div class="layui-inline">
<label class="layui-form-label">更新类型</label>
<div class="layui-input-inline">
<select name="update_type" lay-verify="" lay-search>
<option value=""></option>
<select name="update_type" lay-verify="" lay-search>
<option value="">请选择</option>
<option value="功能更新">功能更新</option>
<option value="BUG优化">BUG优化</option>
<option value="新项目">新项目</option>
</select>
</div>
</div>
......@@ -70,8 +76,8 @@
<div class="layui-form-item">
<div class="layui-btn-container" style="text-align: center; margin-top: 10px;">
<button lay-submit lay-filter="load" class="layui-btn" data-type="search">搜索</button>
<button type="button" class="layui-btn layui-btn-normal export">导出</button>
<button lay-submit lay-filter="load" class="layui-btn">搜索</button>
<button type="button" class="layui-btn layui-btn-normal" id="addData">新增</button>
</div>
</div>
</form>
......@@ -84,9 +90,112 @@
<table id="orderList" lay-filter="orderList"></table>
<table id="systemUpdateList" lay-filter="systemUpdateList"></table>
<script type="text/html" id="active">
<a class="layui-btn layui-btn-xs layui-btn-normal editData" data-json='@{{d.data_json}}' ><strong>编辑</strong></a>
<a class="layui-btn layui-btn-xs layui-btn-normal " ><strong>立即发送</strong></a>
</script>
{{--新增数据--}}
<div id="save_form_show" style="display: none;margin-top: 30px;">
<style>
.fgh .layui-form-label{position: relative;top:5px;width: 100px;}
</style>
<form class="layui-form fgh" lay-filter="data_form" id="data_form_jq">
<div class="layui-form-item">
<div class="layui-inline ">
<label class="layui-form-label">更新时间:</label>
<div class="layui-input-inline">
<input type="text" class="layui-input" lay-filter="update_time" lay-verify="required" name="update_time" id="update_time" >
</div>
</div>
</div>
<input type="hidden" name="smue_id" value="0" id="smue_id">
<div class="layui-form-item">
<label class="layui-form-label">更新系统</label>
<div class="layui-input-inline">
<select name="system_id" lay-filter="system_id" lay-search lay-verify="required">
@foreach(\App\Logic\SystemNoticeLogic::getAllSystemSelect() as $key=>$value)
<option value="{{$key}}">{{$value}}</option>
@endforeach
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">更新类型</label>
<div class="layui-input-inline">
<select name="update_type" lay-filter="update_type" lay-search lay-verify="required">
<option value="功能更新">功能更新</option>
<option value="BUG优化">BUG优化</option>
<option value="新项目">新项目</option>
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">版本号码</label>
<div class="layui-input-inline">
<input type="text" name="version_num" placeholder="填写版本号码" autocomplete="off" class="layui-input" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">更新标题</label>
<div class="layui-input-inline">
<input type="text" name="update_title" lay-filter="update_title" placeholder="填写更新标题" autocomplete="off" class="layui-input" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label" >更新内容:</label>
<div class="layui-input-inline">
<textarea name="update_content" lay-filter="update_content" cols="30" rows="10" class="layui-textarea" style="height: 30px;" lay-verify="required" ></textarea>
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">产品负责人</label>
<div class="layui-input-inline">
<input type="text" name="product_user" lay-filter="product_user" placeholder="填写产品负责人" autocomplete="off" class="layui-input" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">技术负责人</label>
<div class="layui-input-inline">
<input type="text" name="code_user" lay-filter="code_user" placeholder="填写技术负责人" autocomplete="off" class="layui-input" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">测试负责人</label>
<div class="layui-input-inline">
<input type="text" name="test_user" lay-filter="test_user" placeholder="填写测试负责人" autocomplete="off" class="layui-input" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<button class="layui-btn" style="display: none;" id="save_form_click" lay-filter="save_form" lay-submit >提交</button>
</div>
</div>
</form>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment