fixed
This commit is contained in:
77
admin/application/admin/controller/Firmcustomerfeedback.php
Normal file
77
admin/application/admin/controller/Firmcustomerfeedback.php
Normal file
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
|
||||
/**
|
||||
* 客户反馈
|
||||
*
|
||||
* @icon fa fa-circle-o
|
||||
*/
|
||||
class Firmcustomerfeedback extends Backend
|
||||
{
|
||||
|
||||
/**
|
||||
* Firmcustomerfeedback模型对象
|
||||
* @var \app\admin\model\Firmcustomerfeedback
|
||||
*/
|
||||
protected $model = null;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\Firmcustomerfeedback;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
|
||||
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
|
||||
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* 查看
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
//如果发送的来源是Selectpage,则转发到Selectpage
|
||||
if ($this->request->request('keyField')) {
|
||||
return $this->selectpage();
|
||||
}
|
||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||
|
||||
$record_id = input('record_id');
|
||||
if($record_id){
|
||||
$this->model->where('firmcustomerfollowuprecord_id',$record_id);
|
||||
}
|
||||
$list = $this->model
|
||||
->with(['firmcustomer'])
|
||||
->where($where)
|
||||
->order($sort, $order)
|
||||
->paginate($limit);
|
||||
|
||||
foreach ($list as $row) {
|
||||
$row->visible(['id','rel_wx','rel_group','msg','create_time']);
|
||||
$row->visible(['firmcustomer']);
|
||||
$row->getRelation('firmcustomer')->visible(['name']);
|
||||
}
|
||||
|
||||
$result = array("total" => $list->total(), "rows" => $list->items());
|
||||
|
||||
return json($result);
|
||||
}
|
||||
$this->assignconfig("record_id", input('record_id'));
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
}
|
||||
12
admin/application/admin/lang/zh-cn/firmcustomerfeedback.php
Normal file
12
admin/application/admin/lang/zh-cn/firmcustomerfeedback.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'Id' => 'ID',
|
||||
'Firmcustomer_id' => '客户',
|
||||
'Firmcustomerfollowuprecord_id' => '回访记录ID',
|
||||
'Rel_wx' => '关联微信',
|
||||
'Rel_group' => '关联微信群',
|
||||
'Msg' => '反馈内容',
|
||||
'Create_time' => '反馈时间',
|
||||
'Firmcustomer.name' => '客户'
|
||||
];
|
||||
44
admin/application/admin/model/Firmcustomerfeedback.php
Normal file
44
admin/application/admin/model/Firmcustomerfeedback.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
|
||||
class Firmcustomerfeedback extends Model
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 表名
|
||||
protected $name = 'firmcustomerfeedback';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = false;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = false;
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function firmcustomer()
|
||||
{
|
||||
return $this->belongsTo('Firmcustomer', 'firmcustomer_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||
}
|
||||
}
|
||||
27
admin/application/admin/validate/Firmcustomerfeedback.php
Normal file
27
admin/application/admin/validate/Firmcustomerfeedback.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Firmcustomerfeedback extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
45
admin/application/admin/view/firmcustomerfeedback/add.html
Normal file
45
admin/application/admin/view/firmcustomerfeedback/add.html
Normal file
@@ -0,0 +1,45 @@
|
||||
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Firmcustomer_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-firmcustomer_id" min="0" data-rule="required" data-source="firmcustomer/index" class="form-control selectpage" name="row[firmcustomer_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Firmcustomerfollowuprecord_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-firmcustomerfollowuprecord_id" min="0" data-rule="required" data-source="firmcustomerfollowuprecord/index" class="form-control selectpage" name="row[firmcustomerfollowuprecord_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Rel_wx')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-rel_wx" class="form-control" name="row[rel_wx]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Rel_group')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-rel_group" class="form-control" name="row[rel_group]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Msg')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-msg" class="form-control" name="row[msg]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
45
admin/application/admin/view/firmcustomerfeedback/edit.html
Normal file
45
admin/application/admin/view/firmcustomerfeedback/edit.html
Normal file
@@ -0,0 +1,45 @@
|
||||
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Firmcustomer_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-firmcustomer_id" min="0" data-rule="required" data-source="firmcustomer/index" class="form-control selectpage" name="row[firmcustomer_id]" type="text" value="{$row.firmcustomer_id|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Firmcustomerfollowuprecord_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-firmcustomerfollowuprecord_id" min="0" data-rule="required" data-source="firmcustomerfollowuprecord/index" class="form-control selectpage" name="row[firmcustomerfollowuprecord_id]" type="text" value="{$row.firmcustomerfollowuprecord_id|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Rel_wx')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-rel_wx" class="form-control" name="row[rel_wx]" type="text" value="{$row.rel_wx|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Rel_group')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-rel_group" class="form-control" name="row[rel_group]" type="text" value="{$row.rel_group|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Msg')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-msg" class="form-control" name="row[msg]" type="text" value="{$row.msg|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:$row.create_time?datetime($row.create_time):''}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
29
admin/application/admin/view/firmcustomerfeedback/index.html
Normal file
29
admin/application/admin/view/firmcustomerfeedback/index.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<div class="panel panel-default panel-intro">
|
||||
{:build_heading()}
|
||||
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
||||
<!-- <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('firmcustomerfeedback/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
|
||||
<!-- <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('firmcustomerfeedback/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>-->
|
||||
<!-- <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('firmcustomerfeedback/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
|
||||
data-operate-edit="{:$auth->check('firmcustomerfeedback/edit')}"
|
||||
data-operate-del="{:$auth->check('firmcustomerfeedback/del')}"
|
||||
width="100%">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
56
admin/public/assets/js/backend/firmcustomerfeedback.js
Normal file
56
admin/public/assets/js/backend/firmcustomerfeedback.js
Normal file
@@ -0,0 +1,56 @@
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
let record_id = Config.record_id;
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'firmcustomerfeedback/index?record_id='+record_id + location.search,
|
||||
add_url: 'firmcustomerfeedback/add',
|
||||
edit_url: 'firmcustomerfeedback/edit',
|
||||
del_url: 'firmcustomerfeedback/del',
|
||||
multi_url: 'firmcustomerfeedback/multi',
|
||||
import_url: 'firmcustomerfeedback/import',
|
||||
table: 'firmcustomerfeedback',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
columns: [
|
||||
[
|
||||
{checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'rel_wx', title: __('Rel_wx'), operate: 'LIKE'},
|
||||
{field: 'rel_group', title: __('Rel_group'), operate: 'LIKE'},
|
||||
{field: 'msg', title: __('Msg'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'firmcustomer.name', title: __('Firmcustomer.name'), operate: 'LIKE'},
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
// 为表格绑定事件
|
||||
Table.api.bindevent(table);
|
||||
},
|
||||
add: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
edit: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
api: {
|
||||
bindevent: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
}
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
@@ -34,7 +34,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
{field: 'remark', title: __('Remark'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'notes', title: __('Notes'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'visit_msg', title: __('Visit_msg'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'feedback', title: __('Feedback'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
// {field: 'feedback', title: __('Feedback'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'send_time', title: __('Send_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'status', title: __('Status'), searchList: {"no":__('Status no'),"yes":__('Status yes')}, formatter: Table.api.formatter.status},
|
||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
@@ -87,6 +87,21 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
return true;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'feedbackRecord',
|
||||
text: __('反馈记录'),
|
||||
title: __('反馈记录'),
|
||||
classname: 'btn btn-xs btn-primary btn-dialog',
|
||||
icon: 'fa fa-list',
|
||||
url: 'firmcustomerfeedback/index',
|
||||
callback: function (data) {
|
||||
Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
|
||||
},
|
||||
visible: function (row) {
|
||||
//返回true时按钮显示,返回false隐藏
|
||||
return true;
|
||||
}
|
||||
},
|
||||
// {
|
||||
// name: 'setFollwupPlan',
|
||||
// text: __('设置回访计划'),
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
|
||||
/**
|
||||
* 客户反馈
|
||||
*
|
||||
* @icon fa fa-circle-o
|
||||
*/
|
||||
class Firmcustomerfeedback extends Backend
|
||||
{
|
||||
|
||||
/**
|
||||
* Firmcustomerfeedback模型对象
|
||||
* @var \app\admin\model\Firmcustomerfeedback
|
||||
*/
|
||||
protected $model = null;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\Firmcustomerfeedback;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
|
||||
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
|
||||
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* 查看
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
//如果发送的来源是Selectpage,则转发到Selectpage
|
||||
if ($this->request->request('keyField')) {
|
||||
return $this->selectpage();
|
||||
}
|
||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||
|
||||
$list = $this->model
|
||||
->with(['firmcustomer'])
|
||||
->where($where)
|
||||
->order($sort, $order)
|
||||
->paginate($limit);
|
||||
|
||||
foreach ($list as $row) {
|
||||
$row->visible(['id','rel_wx','rel_group','msg','create_time']);
|
||||
$row->visible(['firmcustomer']);
|
||||
$row->getRelation('firmcustomer')->visible(['name']);
|
||||
}
|
||||
|
||||
$result = array("total" => $list->total(), "rows" => $list->items());
|
||||
|
||||
return json($result);
|
||||
}
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'Id' => 'ID',
|
||||
'Firmcustomer_id' => '客户',
|
||||
'Firmcustomerfollowuprecord_id' => '回访记录ID',
|
||||
'Rel_wx' => '关联微信',
|
||||
'Rel_group' => '关联微信群',
|
||||
'Msg' => '反馈内容',
|
||||
'Create_time' => '反馈时间',
|
||||
'Firmcustomer.name' => '客户'
|
||||
];
|
||||
44
superadmin/application/admin/model/Firmcustomerfeedback.php
Normal file
44
superadmin/application/admin/model/Firmcustomerfeedback.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
|
||||
class Firmcustomerfeedback extends Model
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 表名
|
||||
protected $name = 'firmcustomerfeedback';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = false;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = false;
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function firmcustomer()
|
||||
{
|
||||
return $this->belongsTo('Firmcustomer', 'firmcustomer_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Firmcustomerfeedback extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Firmcustomer_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-firmcustomer_id" min="0" data-rule="required" data-source="firmcustomer/index" class="form-control selectpage" name="row[firmcustomer_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Firmcustomerfollowuprecord_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-firmcustomerfollowuprecord_id" min="0" data-rule="required" data-source="firmcustomerfollowuprecord/index" class="form-control selectpage" name="row[firmcustomerfollowuprecord_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Rel_wx')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-rel_wx" class="form-control" name="row[rel_wx]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Rel_group')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-rel_group" class="form-control" name="row[rel_group]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Msg')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-msg" class="form-control" name="row[msg]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,45 @@
|
||||
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Firmcustomer_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-firmcustomer_id" min="0" data-rule="required" data-source="firmcustomer/index" class="form-control selectpage" name="row[firmcustomer_id]" type="text" value="{$row.firmcustomer_id|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Firmcustomerfollowuprecord_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-firmcustomerfollowuprecord_id" min="0" data-rule="required" data-source="firmcustomerfollowuprecord/index" class="form-control selectpage" name="row[firmcustomerfollowuprecord_id]" type="text" value="{$row.firmcustomerfollowuprecord_id|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Rel_wx')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-rel_wx" class="form-control" name="row[rel_wx]" type="text" value="{$row.rel_wx|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Rel_group')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-rel_group" class="form-control" name="row[rel_group]" type="text" value="{$row.rel_group|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Msg')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-msg" class="form-control" name="row[msg]" type="text" value="{$row.msg|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:$row.create_time?datetime($row.create_time):''}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,29 @@
|
||||
<div class="panel panel-default panel-intro">
|
||||
{:build_heading()}
|
||||
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
||||
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('firmcustomerfeedback/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('firmcustomerfeedback/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
|
||||
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('firmcustomerfeedback/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
|
||||
data-operate-edit="{:$auth->check('firmcustomerfeedback/edit')}"
|
||||
data-operate-del="{:$auth->check('firmcustomerfeedback/del')}"
|
||||
width="100%">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
55
superadmin/public/assets/js/backend/firmcustomerfeedback.js
Normal file
55
superadmin/public/assets/js/backend/firmcustomerfeedback.js
Normal file
@@ -0,0 +1,55 @@
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'firmcustomerfeedback/index' + location.search,
|
||||
add_url: 'firmcustomerfeedback/add',
|
||||
edit_url: 'firmcustomerfeedback/edit',
|
||||
del_url: 'firmcustomerfeedback/del',
|
||||
multi_url: 'firmcustomerfeedback/multi',
|
||||
import_url: 'firmcustomerfeedback/import',
|
||||
table: 'firmcustomerfeedback',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
columns: [
|
||||
[
|
||||
{checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'rel_wx', title: __('Rel_wx'), operate: 'LIKE'},
|
||||
{field: 'rel_group', title: __('Rel_group'), operate: 'LIKE'},
|
||||
{field: 'msg', title: __('Msg'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'firmcustomer.name', title: __('Firmcustomer.name'), operate: 'LIKE'},
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
// 为表格绑定事件
|
||||
Table.api.bindevent(table);
|
||||
},
|
||||
add: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
edit: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
api: {
|
||||
bindevent: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
}
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
Reference in New Issue
Block a user